Documentation ¶
Index ¶
- func IsNil(err error) bool
- type Cmd
- func BRPop(timeout time.Duration, keys ...interface{}) Cmd
- func BRPopLPush(source, destination string, timeout time.Duration) Cmd
- func Command(commandName string, args ...interface{}) Cmd
- func Del(keys ...interface{}) Cmd
- func Exists(key string) Cmd
- func Expire(key string, expireIn time.Duration) Cmd
- func ExpireAt(key string, expireAt time.Time) Cmd
- func Get(key string) Cmd
- func HDel(key string, fields ...interface{}) Cmd
- func HExists(key, field string) Cmd
- func HGet(key, field string) Cmd
- func HGetAll(key string) Cmd
- func HIncrBy(key, field string, increment int) Cmd
- func HIncrByFloat(key, field string, increment float64) Cmd
- func HKeys(key string) Cmd
- func HLen(key string) Cmd
- func HMGet(key string, fields ...interface{}) Cmd
- func HMSet(key string, values map[string]interface{}) Cmd
- func HSet(key, field string, value interface{}) Cmd
- func HSetNX(key, field string, value interface{}) Cmd
- func HStrLen(key, field string) Cmd
- func HVals(key string) Cmd
- func LLen(key string) Cmd
- func LPush(key string, values ...interface{}) Cmd
- func LRange(start, stop int) Cmd
- func LRem(key string, size int, val interface{}) Cmd
- func Persist(key string) Cmd
- func RPop(key string) Cmd
- func RPopLPush(source, destination string) Cmd
- func Set(key string, value interface{}, expireIn time.Duration) Cmd
- func ZAdd(key string, fieldValues map[string]float64, extra ...interface{}) Cmd
- func ZRange(key string, start, end int, withScores bool) Cmd
- func ZRangeByScore(key string, min, max float64) Cmd
- func ZRem(key string, members ...interface{}) Cmd
- func ZRemRangeByScore(key string, min, max float64) Cmd
- type Config
- type PubSub
- type Result
- func (r Result) Err() error
- func (r Result) GetBool() (bool, error)
- func (r Result) GetByteSlices() ([][]byte, error)
- func (r Result) GetBytes() ([]byte, error)
- func (r Result) GetFloat64() (float64, error)
- func (r Result) GetFloat64s() ([]float64, error)
- func (r Result) GetInt() (int, error)
- func (r Result) GetInt64() (int64, error)
- func (r Result) GetInt64Map() (map[string]int64, error)
- func (r Result) GetInt64s() ([]int64, error)
- func (r Result) GetIntMap() (map[string]int, error)
- func (r Result) GetInts() ([]int, error)
- func (r Result) GetJSON(i interface{}) ([]byte, error)
- func (r Result) GetPositions() ([]*[2]float64, error)
- func (r Result) GetSlowLogs() ([]SlowLog, error)
- func (r Result) GetString() (string, error)
- func (r Result) GetStringMap() (map[string]string, error)
- func (r Result) GetStrings() ([]string, error)
- func (r Result) GetUint64() (uint64, error)
- func (r Result) GetUint64Map() (map[string]uint64, error)
- func (r Result) GetUint64s() ([]uint64, error)
- func (r Result) GetValue() (interface{}, error)
- func (r Result) GetValues() ([]interface{}, error)
- func (r Result) Value() interface{}
- type Service
- func (s *Service) Do(ctx context.Context, cmd Cmd) Result
- func (s *Service) Multi(ctx context.Context, cmds ...Cmd) Result
- func (s *Service) Ping(ctx context.Context) (string, error)
- func (s *Service) Pipeline(ctx context.Context, cmds ...Cmd) Result
- func (s *Service) PubSub(ctx context.Context) (PubSub, error)
- func (s *Service) StringGet(ctx context.Context, key string) (interface{}, error)
- func (s *Service) StringSet(ctx context.Context, key string, value interface{}, expireIn time.Duration) error
- func (s *Service) ZPopByScore(ctx context.Context, key string, min, max float64) Result
- type SlowLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cmd ¶
type Cmd struct { Command string Args []interface{} }
func HIncrByFloat ¶
func Persist ¶
Persist 移除给定key的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key )。 时间复杂度:O(1), 当生存时间移除成功时,返回 1 . 如果 key 不存在或 key 没有设置生存时间,返回 0 .
func ZRangeByScore ¶
func ZRemRangeByScore ¶
type Config ¶
type Config struct { Host string `json:"host" toml:"host" yaml:"host"` Port string `json:"port" toml:"port" yaml:"port"` Username string `json:"username" toml:"username" yaml:"username"` Password string `json:"password" toml:"password" yaml:"password"` DB int `json:"db" toml:"db" yaml:"db"` // Maximum number of idle connections in the p. MaxIdle int `json:"max_idle" toml:"max_idle" yaml:"max_idle"` // Maximum number of connections allocated by the p at a given time. // When zero, there is no limit on the number of connections in the p. MaxActive int `json:"max_active" toml:"max_active" yaml:"max_active"` // 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. IdleTimeout time.Duration `json:"idle_timeout" toml:"idle_timeout" yaml:"idle_timeout"` // If Wait is true and the p is at the MaxActive limit, then Get() waits // for a connection to be returned to the p before returning. Wait bool `json:"wait" toml:"wait"` // Close connections older than this duration. If the value is zero, then // the p does not close connections based on age. MaxConnLifetime time.Duration `json:"max_conn_lifetime" toml:"max_conn_lifetime" yaml:"max_conn_lifetime"` TLS bool `json:"tls" toml:"tls" yaml:"tls"` }
type PubSub ¶
type PubSub = redis.PubSubConn
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (Result) GetByteSlices ¶
func (Result) GetFloat64 ¶
func (Result) GetFloat64s ¶
func (Result) GetPositions ¶
func (Result) GetSlowLogs ¶
func (Result) GetStrings ¶
func (Result) GetUint64s ¶
Click to show internal directories.
Click to hide internal directories.