mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
OpenIMCommonConfigKey
This commit is contained in:
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…
x
Reference in New Issue
Block a user