Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
sync.RWMutex
Opt *Option
Ring *consistent.Consistent
Pools map[string]*Pool
}
func (*Group) DoWithTimeout ¶
type Manager ¶
type Manager interface {
Do(command string, args ...interface{}) (interface{}, error)
DoWithTimeout(timeout time.Duration, command string, args ...interface{}) (interface{}, error)
Close() error
Stats() (map[string]redigo.PoolStats, error)
}
func NewManager ¶
type Option ¶
type Option struct {
Idle int // max idle connection count
Active int // max active connection count
IdleTimeout time.Duration // connection will remain for this duration
ConnTimeout time.Duration // tcp handshake timeout
ReadTimeout time.Duration // request read timeout
WriteTimeout time.Duration // read and response timeout
MaxConnLifetime time.Duration // per connection max alive duration
Wait bool // if pool is overflow at max active limit, whether wait
}
Click to show internal directories.
Click to hide internal directories.