diff --git a/proto/conf.go b/proto/conf.go index e74663d..e1b1dfa 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -1,6 +1,7 @@ package proto import ( + "VideoStream/worker" "encoding/json" "fmt" "os" @@ -74,6 +75,9 @@ func ReadConfig(path string) error { Config.SERVER_PORT = "5002" // 默认端口 } } + //将配置写入redis + json_data, err := json.Marshal(Config) + worker.SetRedis("vp_stream_config", string(json_data)) SigningKey = []byte(Config.TOKEN_SECRET) if Config.TOKEN_SECRET == "" { err = fmt.Errorf("token secret is empty")