feat: add storage to records

This commit is contained in:
langhuihui
2025-09-25 09:34:17 +08:00
parent 526d2799bb
commit c0a13cbbf2
24 changed files with 1743 additions and 2089 deletions

View File

@@ -3,6 +3,7 @@ package transcode
import (
"bufio"
"fmt"
"maps"
"net"
"net/url"
"os"
@@ -71,7 +72,7 @@ func (t *Transformer) Start() (err error) {
case DecodeConfig:
t.From = v
case map[string]any:
config.Parse(&t.TransRule.From, v)
config.Parse(&t.TransRule.From, maps.Clone(v))
case string:
t.From.Mode = TRANS_MODE_PIPE
t.From.Args = v
@@ -116,7 +117,7 @@ func (t *Transformer) Start() (err error) {
if to.Conf != nil {
switch v := to.Conf.(type) {
case map[string]any:
config.Parse(&enc, v)
config.Parse(&enc, maps.Clone(v))
case string:
enc.Args = v
}