2017-11-09 07:40:55 +00:00
|
|
|
package redis_pool
|
|
|
|
|
|
|
|
const (
|
|
|
|
// 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.
|
2017-11-09 08:01:55 +00:00
|
|
|
DefaultMaxCapacity = 1
|
|
|
|
|
|
|
|
// Maximum number of idle connections in the pool.
|
|
|
|
DefaultMaxIdle = 1
|
2017-11-09 07:40:55 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
)
|