Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGetFromClosedPool = errors.New("pool: get from closed pool") ErrExceedingMaxWaitingDuration = errors.New("pool: exceeding the maximum waiting duration") )
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { DBType string DBArgs []interface{} // how many idle conn to keep when there are no work to do // this field should smaller than Capacity KeepConn uint64 // Maximum number of connections allocated by the pool at a given time. // When zero, there is no limit on the number of connections in the pool. Capacity uint64 MaxWaitDuration time.Duration }
type Pool ¶
type Pool struct { DBType string DBArgs []interface{} // how many idle conn to keep when there are no work to do // this field should smaller than Capacity KeepConn uint64 // Maximum number of connections allocated by the pool at a given time. // When zero, there is no limit on the number of connections in the pool. Capacity uint64 MaxWaitDuration time.Duration DBErrChan chan error // DB errors will be sent in this channel // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.