mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: Add enable config center button && fix: grpc connection leakage (#3036)
* feat: add enable config center * fix: config * fix: config * fix: config * fix: config
This commit is contained in:
@@ -49,7 +49,7 @@ import (
|
||||
// Start rpc server.
|
||||
func Start[T any](ctx context.Context, discovery *conf.Discovery, prometheusConfig *conf.Prometheus, listenIP,
|
||||
registerIP string, autoSetPorts bool, rpcPorts []int, index int, rpcRegisterName string, notification *conf.Notification, config T,
|
||||
watchConfigNames []string,
|
||||
watchConfigNames []string, watchServiceNames []string,
|
||||
rpcFn func(ctx context.Context, config T, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error,
|
||||
options ...grpc.ServerOption) error {
|
||||
|
||||
@@ -95,7 +95,7 @@ func Start[T any](ctx context.Context, discovery *conf.Discovery, prometheusConf
|
||||
if autoSetPorts && discovery.Enable != conf.ETCD {
|
||||
return errs.New("only etcd support autoSetPorts", "rpcRegisterName", rpcRegisterName).Wrap()
|
||||
}
|
||||
client, err := kdisc.NewDiscoveryRegister(discovery, runTimeEnv)
|
||||
client, err := kdisc.NewDiscoveryRegister(discovery, runTimeEnv, watchServiceNames)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user