20 lines
672 B
Go
20 lines
672 B
Go
|
package redis_pool
|
||
|
|
||
|
const (
|
||
|
// Maximum number of idle connections in the pool.
|
||
|
DefaultMaxIdle = 1
|
||
|
|
||
|
// 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.
|
||
|
DefaultMaxActive = 1
|
||
|
|
||
|
// Close connections after remaining idle for this duration. If the value
|
||
|
// is zero, then idle connections are not closed. Applications should set
|
||
|
// the timeout to a value less than the server's timeout.
|
||
|
DefaultIdleTimeout = 0
|
||
|
|
||
|
// If Wait is true and the pool is at the MaxActive limit, then Get() waits
|
||
|
// for a connection to be returned to the pool before returning.
|
||
|
DefaultWait = false
|
||
|
)
|