mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
script
This commit is contained in:
parent
90974298cd
commit
0aa0b257ee
@ -8,6 +8,7 @@ import (
|
||||
"OpenIM/pkg/common/mw"
|
||||
"OpenIM/pkg/common/prome"
|
||||
"OpenIM/pkg/discoveryregistry"
|
||||
"OpenIM/pkg/utils"
|
||||
"fmt"
|
||||
"github.com/OpenIMSDK/openKeeper"
|
||||
grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||
@ -26,7 +27,7 @@ func start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
|
||||
fmt.Println(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, rpcRegisterName)
|
||||
zkClient, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, 10, "", "")
|
||||
if err != nil {
|
||||
return err
|
||||
return utils.Wrap1(err)
|
||||
}
|
||||
defer zkClient.Close()
|
||||
registerIP, err := network.GetRpcRegisterIP(config.Config.RpcRegisterIP)
|
||||
@ -48,7 +49,7 @@ func start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
|
||||
defer srv.GracefulStop()
|
||||
err = zkClient.Register(rpcRegisterName, registerIP, rpcPort)
|
||||
if err != nil {
|
||||
return err
|
||||
return utils.Wrap1(err)
|
||||
}
|
||||
if config.Config.Prometheus.Enable && prometheusPort != 0 {
|
||||
err := prome.StartPrometheusSrv(prometheusPort)
|
||||
|
Loading…
x
Reference in New Issue
Block a user