mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 19:32:17 +08:00 
			
		
		
		
	Add etcd as a service discovery mechanism
This commit is contained in:
		
							parent
							
								
									3bc4477fa6
								
							
						
					
					
						commit
						86a9405680
					
				@ -193,8 +193,7 @@ func (r *SvcDiscoveryRegistryImpl) refreshConnMap(prefix string) {
 | 
			
		||||
		fmt.Printf("Failed to get endpoints: %v\n", err)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Update the connMap with new connections
 | 
			
		||||
	r.connMap[prefix] = []*grpc.ClientConn{} // Update the connMap with new connections
 | 
			
		||||
	for _, kv := range resp.Kvs {
 | 
			
		||||
		_, addr := r.splitEndpoint(string(kv.Key))
 | 
			
		||||
		conn, err := grpc.DialContext(context.Background(), addr, append(r.dialOptions, grpc.WithResolvers(r.resolver))...)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user