mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 20:45:57 +08:00
push use local conn
This commit is contained in:
@@ -37,8 +37,9 @@ type ZkClient struct {
|
||||
lock sync.Locker
|
||||
options []grpc.DialOption
|
||||
|
||||
resolvers map[string]*Resolver
|
||||
localConns map[string][]resolver.Address
|
||||
resolvers map[string]*Resolver
|
||||
localConns map[string][]grpc.ClientConnInterface
|
||||
|
||||
balancerName string
|
||||
|
||||
logger Logger
|
||||
@@ -89,7 +90,7 @@ func NewClient(zkServers []string, zkRoot string, options ...ZkOption) (*ZkClien
|
||||
zkRoot: "/",
|
||||
scheme: zkRoot,
|
||||
timeout: timeout,
|
||||
localConns: make(map[string][]resolver.Address),
|
||||
localConns: make(map[string][]grpc.ClientConnInterface),
|
||||
resolvers: make(map[string]*Resolver),
|
||||
lock: &sync.Mutex{},
|
||||
}
|
||||
@@ -197,6 +198,6 @@ func (s *ZkClient) AddOption(opts ...grpc.DialOption) {
|
||||
s.options = append(s.options, opts...)
|
||||
}
|
||||
|
||||
func (s *ZkClient) GetClientLocalConns() map[string][]resolver.Address {
|
||||
func (s *ZkClient) GetClientLocalConns() map[string][]grpc.ClientConnInterface {
|
||||
return s.localConns
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user