Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGetFromClosedPool if try to get a Conn from the closed pool ErrGetFromClosedPool = errors.New("pool: get from closed pool") // ErrExceedingMaxWaitingDuration try to get a Conn from the pool but exceeding the max waiting time ErrExceedingMaxWaitingDuration = errors.New("pool: exceeding the maximum waiting duration") // ErrSQLType try to connect the SQL which does not support by the pool ErrSQLType = errors.New("pool: sql type does not support") // ErrKeepLTCapacity keepConn larger than the pool capacity ErrKeepLTCapacity = errors.New("pool: KeepConn larger than Capacity") // ErrCapacity provide a invalid capacity ErrCapacity = errors.New("pool: invalid capacity size") // ErrEmptyArgs DB arg is empty ErrEmptyArgs = errors.New("pool: args cannot be empty") )
Functions ¶
This section is empty.
Types ¶
type ConnsState ¶
ConnsState shows Connections List state
type Options ¶
type Options struct { // DB type, e.g. MySQL, SQLite3... Type godbpool.SQLType // DB connection configuration Args interface{} // Conn key generate function KeyFunc func() string // 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. Capacity uint64 // Maximum waiting duration to get a conn from the pool MaxWaitDuration time.Duration // contains filtered or unexported fields }
Options is pool configuration
Click to show internal directories.
Click to hide internal directories.