Documentation ¶
Index ¶
- func DecodeGrpcError(err error) (connectionFailure bool, returnErr error)
- func DecodeGrpcErrorCode(err error) (hasCode bool, code codes.Code)
- func GrpcErrIsConnFail(err error) (connectionFailure bool)
- func LoadTLSCredentials(caCertPEM []byte, clientCertPEM []byte, clientKeyPEM []byte) (credentials.TransportCredentials, error)
- func RegisterSnappyCompressor()
- func SnappyCompressor() string
- type ConnectionFactory
- type MutualTLSFactory
- type Option
- type Options
- type PingFunc
- type Pool
- type PoolClientConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeGrpcError ¶
func GrpcErrIsConnFail ¶
func LoadTLSCredentials ¶
func LoadTLSCredentials(caCertPEM []byte, clientCertPEM []byte, clientKeyPEM []byte) (credentials.TransportCredentials, error)
func RegisterSnappyCompressor ¶
func RegisterSnappyCompressor()
func SnappyCompressor ¶
func SnappyCompressor() string
Types ¶
type ConnectionFactory ¶
type ConnectionFactory interface { NewConnection(ctx context.Context) (*grpc.ClientConn, error) ConnectionOk(ctx context.Context, conn *grpc.ClientConn) error }
type MutualTLSFactory ¶
type MutualTLSFactory struct {
// contains filtered or unexported fields
}
func NewMutualTLSFactory ¶
func (MutualTLSFactory) ConnectionOk ¶
func (f MutualTLSFactory) ConnectionOk(ctx context.Context, conn *grpc.ClientConn) error
func (MutualTLSFactory) NewConnection ¶
func (f MutualTLSFactory) NewConnection(ctx context.Context) (*grpc.ClientConn, error)
func (MutualTLSFactory) NewConnectionWithDialOpts ¶
func (f MutualTLSFactory) NewConnectionWithDialOpts(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
type Option ¶
type Option func(o *Options)
func WithKeepaliveClientParams ¶
func WithKeepaliveClientParams(keepalive keepalive.ClientParameters) Option
func WithOtelTracing ¶
func WithSnappyCompression ¶
type PingFunc ¶
PingFunc should send a GRPC ping/pong to the other side of conn. Returns err or latency.
type PoolClientConn ¶
type PoolClientConn interface { Return() Connection() *grpc.ClientConn }
Click to show internal directories.
Click to hide internal directories.