Documentation ¶
Index ¶
- Constants
- func IsBadConn(err error, goodConnCodes ...grpcCodes.Code) bool
- func UseWrapping(ctx context.Context) bool
- func WithAppendOptions(cc grpc.ClientConnInterface, appendOpts ...grpc.CallOption) grpc.ClientConnInterface
- func WithBeforeFunc(cc grpc.ClientConnInterface, before func()) grpc.ClientConnInterface
- func WithContextModifier(cc grpc.ClientConnInterface, ...) grpc.ClientConnInterface
- func WithoutWrapping(ctx context.Context) context.Context
- type Config
- type Conn
- type Pool
- func (p *Pool) Allow(ctx context.Context, cc Conn)
- func (p *Pool) Ban(ctx context.Context, cc Conn, cause error)
- func (p *Pool) DialTimeout() time.Duration
- func (p *Pool) Get(endpoint endpoint.Endpoint) Conn
- func (p *Pool) GrpcDialOptions() []grpc.DialOption
- func (p *Pool) Release(ctx context.Context) (finalErr error)
- func (p *Pool) Take(context.Context) error
- func (p *Pool) Trace() *trace.Driver
- type State
Constants ¶
View Source
const ( Unknown = State(iota) Created Online Banned Offline Destroyed )
Variables ¶
This section is empty.
Functions ¶
func UseWrapping ¶ added in v3.42.5
func WithAppendOptions ¶ added in v3.40.0
func WithAppendOptions(cc grpc.ClientConnInterface, appendOpts ...grpc.CallOption) grpc.ClientConnInterface
func WithBeforeFunc ¶ added in v3.42.0
func WithBeforeFunc( cc grpc.ClientConnInterface, before func(), ) grpc.ClientConnInterface
func WithContextModifier ¶ added in v3.40.0
func WithContextModifier( cc grpc.ClientConnInterface, modifyCtx func(ctx context.Context) context.Context, ) grpc.ClientConnInterface
Types ¶
type Pool ¶ added in v3.7.0
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) DialTimeout ¶ added in v3.92.0
func (*Pool) GrpcDialOptions ¶ added in v3.92.0
func (p *Pool) GrpcDialOptions() []grpc.DialOption
Click to show internal directories.
Click to hide internal directories.