code: func (client *GRPCClient) NewConnection(address string, serverNameOverride string) (
  	*grpc.ClientConn, error) {
  
  	var dialOpts []grpc.DialOption
  	dialOpts = append(dialOpts, client.dialOpts...)
  
  	// set transport credentials and max send/recv message sizes
  	// immediately before creating a connection in order to allow
  	// SetServerRootCAs / SetMaxRecvMsgSize / SetMaxSendMsgSize
  	//  to take effect on a per connection basis
  	if client.tlsConfig != nil {
  		client.tlsConfig.ServerName = serverNameOverride
  		dialOpts = append(dialOpts,
  			grpc.WithTransportCredentials(
  				credentials.NewTLS(client.tlsConfig)))
  	} else {
  		dialOpts = append(dialOpts, grpc.WithInsecure())
  	}
  	dialOpts = append(dialOpts, grpc.WithDefaultCallOptions(
  		grpc.MaxCallRecvMsgSize(client.maxRecvMsgSize),
  		grpc.MaxCallSendMsgSize(client.maxSendMsgSize)))
  
  	ctx, cancel := context.WithTimeout(context.Background(), client.timeout)
  	defer cancel()
  	conn, err := grpc.DialContext(ctx, address, dialOpts...)
  	if err != nil {
  		return nil, errors.WithMessage(errors.WithStack(err),
  			"failed to create new connection")
  	}
  	return conn, nil
  }
docs: // NewConnection returns a grpc.ClientConn for the target address and
  // overrides the server name used to verify the hostname on the
  // certificate returned by a server when using TLS