Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPoolClosed = errors.New("pool is closed")
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
type CallOption func(*callOptions)
func WithNoRetry ¶
func WithNoRetry() CallOption
func WithRetryResolver ¶
func WithRetryResolver(f RetryResolver) CallOption
type CallerFunc ¶
type CallerFunc func(ctx context.Context, conn *grpc.ClientConn) error
type Factory ¶
type Factory func() (*grpc.ClientConn, error)
Factory is a function type creating a grpc client.
type GRPCPool ¶
type GRPCPool interface { Close() Call(ctx context.Context, timeout time.Duration, caller CallerFunc, opts ...CallOption) error }
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is the grpc client pool.
func (*Pool) Call ¶
func (p *Pool) Call(ctx context.Context, timeout time.Duration, caller CallerFunc, opts ...CallOption) error
type RetryResolver ¶
type SingleConnectionPool ¶
type SingleConnectionPool struct {
// contains filtered or unexported fields
}
func (*SingleConnectionPool) Call ¶
func (p *SingleConnectionPool) Call(ctx context.Context, timeout time.Duration, caller CallerFunc, opts ...CallOption) error
func (*SingleConnectionPool) Close ¶
func (p *SingleConnectionPool) Close()
Click to show internal directories.
Click to hide internal directories.