code: func (c *ConnectionStore) connect(endpoint string, expectedServerCert []byte) (*grpc.ClientConn, error) {
  	c.lock.Lock()
  	defer c.lock.Unlock()
  	// Check again to see if some other goroutine has already connected while
  	// we were waiting on the lock
  	conn, alreadyConnected := c.Connections.Lookup(expectedServerCert)
  	if alreadyConnected {
  		return conn, nil
  	}
  
  	v := c.verifyHandshake(endpoint, expectedServerCert)
  	conn, err := c.dialer.Dial(endpoint, v)
  	if err != nil {
  		return nil, err
  	}
  
  	c.Connections.Put(expectedServerCert, conn)
  	return conn, nil
  }
docs: // connect connects to the given endpoint and expects the given TLS server certificate
  // to be presented at the time of authentication