Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEndpoint ¶
func GetEndpoint(s *DialSettings) string
GetEndpoint returns the endpoint of a DialSettings.
Types ¶
type ClientOption ¶
type ClientOption interface {
Apply(*DialSettings)
}
A ClientOption is an option for a Google API client.
func WithEndpoint ¶
func WithEndpoint(endpoint string) ClientOption
WithEndpoint returns a ClientOption that defines the grpc service endpoint
func WithGRPCConn ¶
func WithGRPCConn(conn *grpc.ClientConn) ClientOption
WithGRPCConn returns a ClientOption that specifies the gRPC client connection to use as the basis of communications. This option may only be used with services that support gRPC as their communication transport. When used, the WithGRPCConn option takes precedent over all other supplied options.
func WithGRPCConnectionPool ¶
func WithGRPCConnectionPool(size int) ClientOption
WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC connections that requests will be balanced between.
This is an EXPERIMENTAL API and may be changed or removed in the future.
func WithGRPCDialOption ¶
func WithGRPCDialOption(opt grpc.DialOption) ClientOption
WithGRPCDialOption returns a ClientOption that appends a new grpc.DialOption to an underlying gRPC dial. It does not work with WithGRPCConn.
type DialSettings ¶
type DialSettings struct { Endpoint string GRPCDialOpts []grpc.DialOption GRPCConn *grpc.ClientConn GRPCConnPool types.ConnPool GRPCConnPoolSize int NoAuth bool SkipValidation bool }
DialSettings holds information needed to establish a connection with a service.
func (*DialSettings) Validate ¶
func (ds *DialSettings) Validate() error
Validate reports an error if ds is invalid.