mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release
# Conflicts: # config/usualConfig.yaml
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
"Open_IM/pkg/utils"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@@ -18,7 +16,7 @@ var (
|
||||
Root = filepath.Join(filepath.Dir(b), "../../..")
|
||||
)
|
||||
|
||||
const confName = "openIMConf"
|
||||
const ConfName = "openIMConf"
|
||||
|
||||
var Config config
|
||||
|
||||
@@ -729,16 +727,3 @@ func init() {
|
||||
Config.TokenPolicy.AccessSecret = UsualConfig.Tokenpolicy.AccessSecret
|
||||
}
|
||||
}
|
||||
|
||||
func RegisterConf() {
|
||||
bytes, err := yaml.Marshal(Config)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
secretMD5 := utils.Md5(Config.Etcd.Secret)
|
||||
confBytes, err := utils.AesEncrypt(bytes, []byte(secretMD5[0:16]))
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
getcdv3.RegisterConf(getcdv3.GetPrefix(Config.Etcd.EtcdSchema, confName), string(confBytes))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user