Documentation ¶
Overview ¶
Package pool provides gRPC connection pool client
Package pool provides gRPC connection pool client
Index ¶
- type ClientConn
- type Conn
- type DialOption
- type Option
- func WithAddr(addr string) Option
- func WithBackoff(bo backoff.Backoff) Option
- func WithDialOptions(opts ...DialOption) Option
- func WithDialTimeout(dur string) Option
- func WithEndPort(port int) Option
- func WithErrGroup(eg errgroup.Group) Option
- func WithHost(host string) Option
- func WithOldConnCloseDuration(dur string) Option
- func WithPort(port int) Option
- func WithResolveDNS(flg bool) Option
- func WithSize(size uint64) Option
- func WithStartPort(port int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConn ¶
type ClientConn = grpc.ClientConn
type Conn ¶
type Conn interface { Connect(context.Context) (Conn, error) Disconnect() error Do(ctx context.Context, f func(*ClientConn) error) error Get(ctx context.Context) (conn *ClientConn, ok bool) IsHealthy(context.Context) bool IsIPConn() bool Len() uint64 Size() uint64 Reconnect(ctx context.Context, force bool) (Conn, error) String() string }
type DialOption ¶
type DialOption = grpc.DialOption
type Option ¶
type Option func(*pool)
func WithBackoff ¶
func WithDialOptions ¶
func WithDialOptions(opts ...DialOption) Option
func WithDialTimeout ¶ added in v0.0.32
func WithEndPort ¶
func WithErrGroup ¶ added in v1.3.1
func WithOldConnCloseDuration ¶ added in v0.0.29
func WithResolveDNS ¶ added in v0.0.45
func WithStartPort ¶
Click to show internal directories.
Click to hide internal directories.