mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-30 10:19:22 +08:00
etcd conf
This commit is contained in:
parent
4709e536ee
commit
7a5a308c9b
@ -139,12 +139,7 @@ func registerConf(key, conf string) {
|
||||
panic(err.Error())
|
||||
}
|
||||
//lease
|
||||
ctx, _ := context.WithCancel(context.Background())
|
||||
resp, err := cli.Grant(ctx, 10)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
if _, err := cli.Put(ctx, key, conf, clientv3.WithLease(resp.ID)); err != nil {
|
||||
if _, err := cli.Put(context.Background(), key, conf); err != nil {
|
||||
fmt.Println("panic, params: ")
|
||||
panic(err.Error())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user