Documentation
¶
Overview ¶
Package pool is a generic, high-performance pool for net.Conn objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// InitialSize creates a number of connection on pool initialization
// Default: 0
InitialSize int
// MaxCap sets the maximum pool capacity. Will be automatically adjusted when InitialSize
// is larger.
// Default: 10
MaxCap int
// IdleTimeout timeout after which connections are reaped and
// automatically removed from the pool.
// Default: 0 (= never)
IdleTimeout time.Duration
// ReapInterval determines the frequency of reap cycles
// Default: 1 minute
ReapInterval time.Duration
}
Options can tweak Pool configuration
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool contains a number of connections
Click to show internal directories.
Click to hide internal directories.