Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConnProvider ¶
type ClientConnProvider interface { // NewClientConn gets a client conn for the given address. It may reuse a pooled client conn. // // The given Context is only used for dialing if the connection is not already cached. NewClientConn(ctx context.Context, address string) (grpc.ClientConnInterface, error) }
ClientConnProvider provides client connections.
func NewClientConnProvider ¶
func NewClientConnProvider( ctx context.Context, logger *zap.Logger, options ...ClientConnProviderOption, ) (ClientConnProvider, error)
NewClientConnProvider returns a new ClientConnProvider. It handles the closing of the clientConns created through it.
type ClientConnProviderOption ¶
type ClientConnProviderOption func(*clientConnProvider)
ClientConnProviderOption is an option for a new ClientConn.
func ClientConnProviderWithObservability ¶
func ClientConnProviderWithObservability() ClientConnProviderOption
ClientConnProviderWithObservability returns a new ClientConnProviderOption to use OpenCensus tracing and metrics.
The default is to use no observability.
func ClientConnProviderWithTLSConfig ¶
func ClientConnProviderWithTLSConfig(tlsConfig *tls.Config) ClientConnProviderOption
ClientConnProviderWithTLSConfig returns a new ClientConnProviderOption to use the tls.Config.
The default is to use no TLS.
Click to show internal directories.
Click to hide internal directories.