mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-09-08 21:13:15 +08:00
etcd conf
This commit is contained in:
parent
a556cfcd40
commit
5d54225f9d
@ -139,8 +139,7 @@ func registerConf(key, conf string) {
|
|||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
//lease
|
//lease
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, _ := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
|
||||||
resp, err := cli.Grant(ctx, 10)
|
resp, err := cli.Grant(ctx, 10)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
@ -162,5 +161,7 @@ func RegisterConf() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err.Error())
|
panic(err.Error())
|
||||||
}
|
}
|
||||||
|
fmt.Println("start register", secretMD5)
|
||||||
registerConf(GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName), string(confBytes))
|
registerConf(GetPrefix(config.Config.Etcd.EtcdSchema, config.ConfName), string(confBytes))
|
||||||
|
fmt.Println("etcd register conf ok")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user