OpenIMCommonConfigKey

test-errcode
withchao 3 years ago
parent c036d27b36
commit 119f8bf820

@ -1,8 +1,10 @@
package main
import (
"bytes"
"context"
"fmt"
"gopkg.in/yaml.v3"
"net"
"strconv"
@ -37,6 +39,13 @@ func run(port int) error {
if err != nil {
return err
}
buf := bytes.NewBuffer(nil)
if err := yaml.NewEncoder(buf).Encode(config.Config); err != nil {
return err
}
if err := zk.RegisterConf2Registry(constant.OpenIMCommonConfigKey, buf.Bytes()); err != nil {
return err
}
log.NewPrivateLog(constant.LogFileName)
router := api.NewGinRouter(zk, rdb)
var address string

@ -325,3 +325,5 @@ const (
FlagPrometheusPort = "prometheus_port"
FlagConf = "config_folder_path"
)
const OpenIMCommonConfigKey = "OpenIMServerConfig"

Loading…
Cancel
Save