mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 03:26:57 +08:00
OpenIMCommonConfigKey
This commit is contained in:
parent
c036d27b36
commit
119f8bf820
@ -1,8 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gopkg.in/yaml.v3"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
@ -37,6 +39,13 @@ func run(port int) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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)
|
log.NewPrivateLog(constant.LogFileName)
|
||||||
router := api.NewGinRouter(zk, rdb)
|
router := api.NewGinRouter(zk, rdb)
|
||||||
var address string
|
var address string
|
||||||
|
@ -325,3 +325,5 @@ const (
|
|||||||
FlagPrometheusPort = "prometheus_port"
|
FlagPrometheusPort = "prometheus_port"
|
||||||
FlagConf = "config_folder_path"
|
FlagConf = "config_folder_path"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const OpenIMCommonConfigKey = "OpenIMServerConfig"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user