Versions in this module Expand all Collapse all v1 v1.8.9 Sep 24, 2022 Changes in this version + var ErrNil = errors.New("redigo: nil returned") + var ErrPoolExhausted = errors.New("redigo: connection pool exhausted") + func Bool(reply interface{}, err error) (bool, error) + func ByteSlices(reply interface{}, err error) ([][]byte, error) + func Bytes(reply interface{}, err error) ([]byte, error) + func DoContext(c Conn, ctx context.Context, cmd string, args ...interface{}) (interface{}, error) + func DoWithTimeout(c Conn, timeout time.Duration, cmd string, args ...interface{}) (interface{}, error) + func Float64(reply interface{}, err error) (float64, error) + func Float64Map(result interface{}, err error) (map[string]float64, error) + func Float64s(reply interface{}, err error) ([]float64, error) + func Int(reply interface{}, err error) (int, error) + func Int64(reply interface{}, err error) (int64, error) + func Int64Map(result interface{}, err error) (map[string]int64, error) + func Int64s(reply interface{}, err error) ([]int64, error) + func IntMap(result interface{}, err error) (map[string]int, error) + func Ints(reply interface{}, err error) ([]int, error) + func MultiBulk(reply interface{}, err error) ([]interface{}, error) + func Positions(result interface{}, err error) ([]*[2]float64, error) + func ReceiveContext(c Conn, ctx context.Context) (interface{}, error) + func ReceiveWithTimeout(c Conn, timeout time.Duration) (interface{}, error) + func Scan(src []interface{}, dest ...interface{}) ([]interface{}, error) + func ScanSlice(src []interface{}, dest interface{}, fieldNames ...string) error + func ScanStruct(src []interface{}, dest interface{}) error + func String(reply interface{}, err error) (string, error) + func StringMap(reply interface{}, err error) (map[string]string, error) + func Strings(reply interface{}, err error) ([]string, error) + func Uint64(reply interface{}, err error) (uint64, error) + func Uint64Map(result interface{}, err error) (map[string]uint64, error) + func Uint64s(reply interface{}, err error) ([]uint64, error) + func Values(reply interface{}, err error) ([]interface{}, error) + type Args []interface + func (args Args) Add(value ...interface{}) Args + func (args Args) AddFlat(v interface{}) Args + type Argument interface + RedisArg func() interface{} + type Conn interface + Close func() error + Do func(commandName string, args ...interface{}) (reply interface{}, err error) + Err func() error + Flush func() error + Receive func() (reply interface{}, err error) + Send func(commandName string, args ...interface{}) error + func Dial(network, address string, options ...DialOption) (Conn, error) + func DialContext(ctx context.Context, network, address string, options ...DialOption) (Conn, error) + func DialTimeout(network, address string, ...) (Conn, error) + func DialURL(rawurl string, options ...DialOption) (Conn, error) + func DialURLContext(ctx context.Context, rawurl string, options ...DialOption) (Conn, error) + func NewConn(netConn net.Conn, readTimeout, writeTimeout time.Duration) Conn + func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn + func NewLoggingConnFilter(conn Conn, logger *log.Logger, prefix string, skip func(cmdName string) bool) Conn + type ConnWithContext interface + DoContext func(ctx context.Context, commandName string, args ...interface{}) (reply interface{}, err error) + ReceiveContext func(ctx context.Context) (reply interface{}, err error) + type ConnWithTimeout interface + DoWithTimeout func(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) + ReceiveWithTimeout func(timeout time.Duration) (reply interface{}, err error) + type DialOption struct + func DialClientName(name string) DialOption + func DialConnectTimeout(d time.Duration) DialOption + func DialContextFunc(f func(ctx context.Context, network, addr string) (net.Conn, error)) DialOption + func DialDatabase(db int) DialOption + func DialKeepAlive(d time.Duration) DialOption + func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption + func DialPassword(password string) DialOption + func DialReadTimeout(d time.Duration) DialOption + func DialTLSConfig(c *tls.Config) DialOption + func DialTLSHandshakeTimeout(d time.Duration) DialOption + func DialTLSSkipVerify(skip bool) DialOption + func DialUseTLS(useTLS bool) DialOption + func DialUsername(username string) DialOption + func DialWriteTimeout(d time.Duration) DialOption + type Error string + func (err Error) Error() string + type Latency struct + Latest time.Duration + Max time.Duration + Name string + Time time.Time + func Latencies(result interface{}, err error) ([]Latency, error) + type LatencyHistory struct + ExecutionTime time.Duration + Time time.Time + func LatencyHistories(result interface{}, err error) ([]LatencyHistory, error) + type Message struct + Channel string + Data []byte + Pattern string + type Pong struct + Data string + type Pool struct + Dial func() (Conn, error) + DialContext func(ctx context.Context) (Conn, error) + IdleTimeout time.Duration + MaxActive int + MaxConnLifetime time.Duration + MaxIdle int + TestOnBorrow func(c Conn, t time.Time) error + Wait bool + func NewPool(newFn func() (Conn, error), maxIdle int) *Pool + func (p *Pool) ActiveCount() int + func (p *Pool) Close() error + func (p *Pool) Get() Conn + func (p *Pool) GetContext(ctx context.Context) (Conn, error) + func (p *Pool) IdleCount() int + func (p *Pool) Stats() PoolStats + type PoolStats struct + ActiveCount int + IdleCount int + WaitCount int64 + WaitDuration time.Duration + type PubSubConn struct + Conn Conn + func (c PubSubConn) Close() error + func (c PubSubConn) PSubscribe(channel ...interface{}) error + func (c PubSubConn) PUnsubscribe(channel ...interface{}) error + func (c PubSubConn) Ping(data string) error + func (c PubSubConn) Receive() interface{} + func (c PubSubConn) ReceiveContext(ctx context.Context) interface{} + func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} + func (c PubSubConn) Subscribe(channel ...interface{}) error + func (c PubSubConn) Unsubscribe(channel ...interface{}) error + type Scanner interface + RedisScan func(src interface{}) error + type Script struct + func NewScript(keyCount int, src string) *Script + func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) + func (s *Script) DoContext(ctx context.Context, c Conn, keysAndArgs ...interface{}) (interface{}, error) + func (s *Script) Hash() string + func (s *Script) Load(c Conn) error + func (s *Script) Send(c Conn, keysAndArgs ...interface{}) error + func (s *Script) SendHash(c Conn, keysAndArgs ...interface{}) error + type SlowLog struct + Args []string + ClientAddr string + ClientName string + ExecutionTime time.Duration + ID int64 + Time time.Time + func SlowLogs(result interface{}, err error) ([]SlowLog, error) + type Subscription struct + Channel string + Count int + Kind string