package pool

Import Path
	github.com/go-redis/redis/v8/internal/pool (on go.dev)

Dependency Relation
	imports 10 packages, and imported by one package


Package-Level Type Names (total 9, in which 8 are exported)
/* sort exporteds by: | */
( T) Error() string ( T) Unwrap() error T : error T : golang.org/x/xerrors.Wrapper
Inited bool (*T) Close() error (*T) RemoteAddr() net.Addr (*T) SetNetConn(netConn net.Conn) (*T) SetUsedAt(tm time.Time) (*T) UsedAt() time.Time (*T) WithReader(ctx context.Context, timeout time.Duration, fn func(rd *proto.Reader) error) error (*T) WithWriter(ctx context.Context, timeout time.Duration, fn func(wr *proto.Writer) error) error (*T) Write(b []byte) (int, error) *T : github.com/go-git/go-git/v5/plumbing/protocol/packp/sideband.Progress *T : github.com/jbenet/go-context/io.Writer *T : io.Closer *T : io.WriteCloser *T : io.Writer func NewConn(netConn net.Conn) *Conn func (*ConnPool).Get(ctx context.Context) (*Conn, error) func (*ConnPool).NewConn(ctx context.Context) (*Conn, error) func Pooler.Get(context.Context) (*Conn, error) func Pooler.NewConn(context.Context) (*Conn, error) func (*SingleConnPool).Get(ctx context.Context) (*Conn, error) func (*SingleConnPool).NewConn(ctx context.Context) (*Conn, error) func (*StickyConnPool).Get(ctx context.Context) (*Conn, error) func (*StickyConnPool).NewConn(ctx context.Context) (*Conn, error) func NewSingleConnPool(pool Pooler, cn *Conn) *SingleConnPool func (*ConnPool).CloseConn(cn *Conn) error func (*ConnPool).Put(ctx context.Context, cn *Conn) func (*ConnPool).Remove(ctx context.Context, cn *Conn, reason error) func Pooler.CloseConn(*Conn) error func Pooler.Put(context.Context, *Conn) func Pooler.Remove(context.Context, *Conn, error) func (*SingleConnPool).CloseConn(cn *Conn) error func (*SingleConnPool).Put(ctx context.Context, cn *Conn) func (*SingleConnPool).Remove(ctx context.Context, cn *Conn, reason error) func (*StickyConnPool).CloseConn(cn *Conn) error func (*StickyConnPool).Put(ctx context.Context, cn *Conn) func (*StickyConnPool).Remove(ctx context.Context, cn *Conn, reason error)
(*T) Close() error (*T) CloseConn(cn *Conn) error (*T) Filter(fn func(*Conn) bool) error Get returns existed connection from the pool or creates a new one. IdleLen returns number of idle connections. Len returns total number of connections. (*T) NewConn(ctx context.Context) (*Conn, error) (*T) Put(ctx context.Context, cn *Conn) (*T) ReapStaleConns() (int, error) (*T) Remove(ctx context.Context, cn *Conn, reason error) (*T) Stats() *Stats *T : Pooler *T : io.Closer func NewConnPool(opt *Options) *ConnPool
Dialer func(context.Context) (net.Conn, error) IdleCheckFrequency time.Duration IdleTimeout time.Duration MaxConnAge time.Duration MinIdleConns int OnClose func(*Conn) error PoolSize int PoolTimeout time.Duration func NewConnPool(opt *Options) *ConnPool
( T) Close() error ( T) CloseConn(*Conn) error ( T) Get(context.Context) (*Conn, error) ( T) IdleLen() int ( T) Len() int ( T) NewConn(context.Context) (*Conn, error) ( T) Put(context.Context, *Conn) ( T) Remove(context.Context, *Conn, error) ( T) Stats() *Stats *ConnPool *SingleConnPool *StickyConnPool T : io.Closer func NewSingleConnPool(pool Pooler, cn *Conn) *SingleConnPool func NewStickyConnPool(pool Pooler) *StickyConnPool
(*T) Close() error (*T) CloseConn(cn *Conn) error (*T) Get(ctx context.Context) (*Conn, error) (*T) IdleLen() int (*T) Len() int (*T) NewConn(ctx context.Context) (*Conn, error) (*T) Put(ctx context.Context, cn *Conn) (*T) Remove(ctx context.Context, cn *Conn, reason error) (*T) Stats() *Stats *T : Pooler *T : io.Closer func NewSingleConnPool(pool Pooler, cn *Conn) *SingleConnPool
Stats contains pool state information and accumulated stats. // number of times free connection was found in the pool // number of idle connections in the pool // number of times free connection was NOT found in the pool // number of stale connections removed from the pool // number of times a wait timeout occurred // number of total connections in the pool func (*ConnPool).Stats() *Stats func Pooler.Stats() *Stats func (*SingleConnPool).Stats() *Stats func (*StickyConnPool).Stats() *Stats
(*T) Close() error (*T) CloseConn(cn *Conn) error (*T) Get(ctx context.Context) (*Conn, error) (*T) IdleLen() int (*T) Len() int (*T) NewConn(ctx context.Context) (*Conn, error) (*T) Put(ctx context.Context, cn *Conn) (*T) Remove(ctx context.Context, cn *Conn, reason error) (*T) Reset(ctx context.Context) error (*T) Stats() *Stats *T : Pooler *T : io.Closer func NewStickyConnPool(pool Pooler) *StickyConnPool
Package-Level Functions (total 4, all are exported)
func NewConn(netConn net.Conn) *Conn
Package-Level Variables (total 4, in which 2 are exported)
Package-Level Constants (total 3, none are exported)