code: func (cc *CachingConnector) DialContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
  	logger.Debugf("DialContext: %s", target)
  
  	cc.lock.Lock()
  	c, ok := cc.loadConn(target)
  	if !ok {
  		createdConn, err := cc.createConn(ctx, target, opts...)
  		if err != nil {
  			cc.lock.Unlock()
  			return nil, errors.WithMessage(err, "connection creation failed")
  		}
  		c = createdConn
  	}
  
  	cc.lock.Unlock()
  
  	if err := cc.openConn(ctx, c); err != nil {
  		cc.lock.Lock()
  		setClosed(c)
  		cc.lock.Unlock()
  		return nil, errors.Errorf("dialing connection timed out [%s]", target)
  	}
  	return c.conn, nil
  }
docs: // DialContext is a wrapper for grpc.DialContext where connections are cached.