Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // if is redis-cluster IsCluster bool // required redis addr Address string // if has password Password string // default is 10 seconds DialTimeout time.Duration // default is 10 seconds ReadTimeout time.Duration // default is 10 seconds WriteTimeout time.Duration // default is 20 OpenConns int // default is keep alive Lifetime time.Duration // Prefix will wrap redis-key at head // default is nil Prefix func(key string) (keyWithPrefix string) // DB select redis database // default is nil // useless in cluster DB int }
Config desc redis client method
type RD ¶
type RD interface { // ErrNil declare NIL-error ErrNil() error // Do execute redis command Do(cmd string, args ...interface{}) (interface{}, error) DoBool(cmd string, args ...interface{}) (bool, error) DoBytes(cmd string, args ...interface{}) ([]byte, error) DoFloat64(cmd string, args ...interface{}) (float64, error) DoInt(cmd string, args ...interface{}) (int, error) DoInt64(cmd string, args ...interface{}) (int64, error) DoInts(cmd string, args ...interface{}) ([]int, error) DoString(cmd string, args ...interface{}) (string, error) DoStringMap(cmd string, args ...interface{}) (map[string]string, error) DoStrings(cmd string, args ...interface{}) ([]string, error) Values(cmd string, args ...interface{}) ([]interface{}, error) Scan(src []interface{}, dst ...interface{}) ([]interface{}, error) Close() }
RD declare redis client method
Click to show internal directories.
Click to hide internal directories.