Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2022 Changes in this version + const MonitorState + const MultiState + const SubscribeState + const WatchState + var ErrNil = errors.New("redigo: nil returned") + var ErrNoReply = errors.New("redis: no reply in result set") + 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 Float64(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 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(result interface{}, err error) (map[string]string, error) + func Strings(reply interface{}, err error) ([]string, error) + func Uint64(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 CommandInfo struct + Clear int + Set int + func LookupCommandInfo(commandName string) CommandInfo + type Config struct + Addr string + Auth string + DialTimeout xtime.Duration + Name string + Proto string + ReadTimeout xtime.Duration + SlowLog xtime.Duration + WriteTimeout xtime.Duration + 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 + WithContext func(ctx context.Context) Conn + func Dial(network, address string, options ...DialOption) (Conn, error) + func DialTimeout(network, address string, ...) (Conn, error) + func DialURL(rawurl string, options ...DialOption) (Conn, error) + func NewConn(c *Config) (cn Conn, err error) + func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn + type DialOption struct + func DialConnectTimeout(d time.Duration) DialOption + func DialDatabase(db int) DialOption + func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption + func DialPassword(password string) DialOption + func DialReadTimeout(d time.Duration) DialOption + func DialWriteTimeout(d time.Duration) DialOption + type Error string + func (err Error) Error() string + type Message struct + Channel string + Data []byte + type MockErr struct + Error error + func MockWith(err error) MockErr + func (m MockErr) Close() error + func (m MockErr) Do(commandName string, args ...interface{}) (interface{}, error) + func (m MockErr) Err() error + func (m MockErr) Flush() error + func (m MockErr) Receive() (interface{}, error) + func (m MockErr) Send(commandName string, args ...interface{}) error + func (m MockErr) WithContext(context.Context) Conn + type PMessage struct + Channel string + Data []byte + Pattern string + type Pipeliner interface + Exec func(ctx context.Context) (rs *Replies, err error) + Send func(commandName string, args ...interface{}) + type Pong struct + Data string + type Pool struct + func NewPool(c *Config, options ...DialOption) (p *Pool) + func (p *Pool) Close() error + func (p *Pool) Get(ctx context.Context) Conn + func (p *Pool) SetStatFunc(fn func(name, addr, cmd string, t time.Time, err error) func()) + 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) Subscribe(channel ...interface{}) error + func (c PubSubConn) Unsubscribe(channel ...interface{}) error + type Redis struct + func NewRedis(c *Config, options ...DialOption) *Redis + func (r *Redis) Close() error + func (r *Redis) Conn(ctx context.Context) Conn + func (r *Redis) Do(ctx context.Context, commandName string, args ...interface{}) (reply interface{}, err error) + func (r *Redis) Pipeline() (p Pipeliner) + type Replies struct + func (rs *Replies) Next() bool + func (rs *Replies) Scan() (reply interface{}, err error) + type Script struct + func NewScript(keyCount int, src string) *Script + func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) + 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 Subscription struct + Channel string + Count int + Kind string