Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LimitReached error = fmt.Errorf("limit reached")
View Source
var Timeout = fmt.Errorf("timeout")
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct { New NewFunc // contains filtered or unexported fields }
The Pool is the default/reference implementation of the pooler interface. It is safe for concurrent use. The New() function will never be called concurrently and so may access variables without worrying about concurrency protection
func (*Pool) Get ¶
Get will return an interface from the pool, or attempt to create a new one if it cannot get one. If the New() function is nil or returns an error, it will wait for an interface{} to become available via Put(). These will be processed with FIFO semantics.
func (*Pool) SetTimeout ¶
Click to show internal directories.
Click to hide internal directories.