From f74a401a81f80b99342a9abd674e5cbca1e48246 Mon Sep 17 00:00:00 2001 From: lijun Date: Tue, 14 Jan 2025 15:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=86=99?= =?UTF-8?q?=E5=85=A5redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto/conf.go | 4 ++++ 1 file changed, 4 insertions(+) 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")