Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connect ¶
type Connect func(string) (Connection, error)
type Connection ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Borrow ¶
Borrow tries to borrow an existing database connection or tries to create a new one if none exists. The wait flag indicates if the caller wants to wait for a connection to be returned if there aren't any idle connection available.
func (*Pool) CleanUp ¶
func (p *Pool) CleanUp()
Prune all old connection on all the servers, this makes sure that servers gets removed from the map at some point in time. If there is a noticed failed connect still active we should wait a while with removal to get prioritization right.
func (*Pool) Return ¶
func (p *Pool) Return(c Connection)
type PoolClosed ¶
type PoolClosed struct { }
func (*PoolClosed) Error ¶
func (e *PoolClosed) Error() string
type PoolTimeout ¶
type PoolTimeout struct {
// contains filtered or unexported fields
}
func (*PoolTimeout) Error ¶
func (e *PoolTimeout) Error() string
Click to show internal directories.
Click to hide internal directories.