trace_redis

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDialTimeout  = 1000 // millisecond
	MaxReadTimeout  = 1000 // millisecond
	MaxWriteTimeout = 3000 // millisecond
	MaxPoolSize     = 1024
	MaxPoolTimeout  = 2 // second
	MinIdleConns    = 3
	MaxRetries      = 1
)

Variables

View Source
var (
	ErrNotFoundConfig = errors.New("no config found")
	ErrInvalidConfig  = errors.New("named config is not a valid *Config type")
)

errors

Functions

func AddCfg

func AddCfg(v Redis)

func InitCfg

func InitCfg(cfg []Redis)

func ListCfg

func ListCfg() map[string]interface{}

Types

type Client

type Client struct {
	*goredis.Client
	// contains filtered or unexported fields
}

A Client wraps redis client with custom features

func New

func New(config *Config) (*Client, error)

New creates a new redis client with config given and a dummy logger.

func NewWithLogger

func NewWithLogger(config *Config, log log.Logger) (*Client, error)

NewWithLogger creates a new redis client with config and logger given.

func (*Client) Select

func (c *Client) Select(db int) (*Client, error)

Select changes db by coping out a new client.

NOTE: There maybe a deadlock if internal invocations panic!!!

func (*Client) Trace

func (c *Client) Trace(ctx context.Context, tracers ...opentracing.Tracer) *TraceClient

Trace creates a new redis client with tracer.

func (*Client) TraceWithSpanContext

func (c *Client) TraceWithSpanContext(ctx opentracing.SpanContext, tracers ...opentracing.Tracer) *TraceClient

ctx.Request => redisClient.TraceWithSpanContext(ctx.Request.Context())

type Config

type Config struct {
	Network              string `yaml:"network"`
	Addr                 string `yaml:"addr"`
	Passwd               string `yaml:"password"`
	DB                   int    `yaml:"database"`
	DialTimeout          int    `yaml:"dial_timeout"`
	ReadTimeout          int    `yaml:"read_timeout"`
	WriteTimeout         int    `yaml:"write_timeout"`
	PoolSize             int    `yaml:"pool_size"`
	PoolTimeout          int    `yaml:"pool_timeout"`
	MinIdleConns         int    `yaml:"min_idle_conns"`
	MaxRetries           int    `yaml:"max_retries"`
	TraceIncludeNotFound bool   `yaml:"trace_include_not_found"`
}

A config of go redis

func (*Config) FillWithDefaults

func (c *Config) FillWithDefaults()

FillWithDefaults apply default values for fields with invalid values.

func (*Config) Name

func (c *Config) Name() string

Name returns client name of the config

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages multi redis clients for easy usage.

var (
	DefaultMgr *Manager
)

TODO: We should use redis clusters config map instead of local DefaultMgr!!!

var (
	RedisMgr *Manager
)

Global redis manager

func NewManager

func NewManager(configs *ManagerConfig) *Manager

NewManager creates a new manager store of redis with configs.

func (*Manager) Add

func (mgr *Manager) Add(name string, config *Config)

Add registers a new config of redis with the name given.

NOTE: It will remove client related to the name if existed.

func (*Manager) Config

func (mgr *Manager) Config(name string) (config *Config, err error)

Config returns a config registered with the name given

func (*Manager) Del

func (mgr *Manager) Del(name string)

Del removes both client and config of redis registered with the name given.

func (*Manager) List

func (mgr *Manager) List(configs *ManagerConfig) map[string]interface{}

func (*Manager) Load

func (mgr *Manager) Load(configs *ManagerConfig)

Load registers all configs with its name defined by ManagerConfig

func (*Manager) NewClient

func (mgr *Manager) NewClient(name string) (*Client, error)

NewClient finds or creates a redis client registered with the name given

func (*Manager) NewClientWithLogger

func (mgr *Manager) NewClientWithLogger(name string, log log.Logger) (*Client, error)

NewClientWithLogger finds or creates a redis client registered with the name and logger given

type ManagerConfig

type ManagerConfig map[string]*Config

A ManagerConfig defines a list of redis config with its name

type Redis

type Redis struct {
	Name         string  `mapstructure:"name"`
	Addr         string  `mapstructure:"addr"`
	Pwd          string  `mapstructure:"pwd"`
	Db           float64 `mapstructure:"db"`
	DialTimeout  float64 `mapstructure:"dial_timeout"`
	ReadTimeout  float64 `mapstructure:"read_timeout"`
	WriteTimeout float64 `mapstructure:"write_timeout"`
	PoolSize     float64 `mapstructure:"pool_size"`
	MinIdleConns float64 `mapstructure:"min_idle_conns"`
	MaxRetries   float64 `mapstructure:"max_retries"`
}

type RedisClient

type RedisClient struct {
	*Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(schema string) *RedisClient

func NewClientDb

func NewClientDb(schema string, db int) *RedisClient

func (*RedisClient) BitCount

func (c *RedisClient) BitCount(ctx context.Context, key string, pos ...int64) (int64, error)

func (*RedisClient) Decr

func (c *RedisClient) Decr(ctx context.Context, key string) (int64, error)

func (*RedisClient) Del

func (c *RedisClient) Del(ctx context.Context, vals ...string) (int64, error)

func (*RedisClient) Exists

func (c *RedisClient) Exists(ctx context.Context, vals ...string) (int64, error)

func (*RedisClient) Expire

func (c *RedisClient) Expire(ctx context.Context, key string, i time.Duration) (bool, error)

func (*RedisClient) Get

func (c *RedisClient) Get(ctx context.Context, key string) (string, error)

func (*RedisClient) GetBit

func (c *RedisClient) GetBit(ctx context.Context, key string, i int64) (int64, error)

func (*RedisClient) HDel

func (c *RedisClient) HDel(ctx context.Context, key string, vals ...string) (int64, error)

func (*RedisClient) HExists

func (c *RedisClient) HExists(ctx context.Context, key string, val string) (bool, error)

func (*RedisClient) HGet

func (c *RedisClient) HGet(ctx context.Context, key string, val string) (string, error)

func (*RedisClient) HGetAll

func (c *RedisClient) HGetAll(ctx context.Context, key string) (map[string]string, error)

func (*RedisClient) HIncrBy

func (c *RedisClient) HIncrBy(ctx context.Context, key string, val string, i int64) (int64, error)

func (*RedisClient) HLen

func (c *RedisClient) HLen(ctx context.Context, key string) (int64, error)

func (*RedisClient) HMGet

func (c *RedisClient) HMGet(ctx context.Context, key string, vals ...string) ([]interface{}, error)

func (*RedisClient) HMSet

func (c *RedisClient) HMSet(ctx context.Context, key string, mdata map[string]interface{}) (string, error)

func (*RedisClient) HSet

func (c *RedisClient) HSet(ctx context.Context, key string, val string, iface interface{}) (bool, error)

func (*RedisClient) Incr

func (c *RedisClient) Incr(ctx context.Context, key string) (int64, error)

func (*RedisClient) IncrBy

func (c *RedisClient) IncrBy(ctx context.Context, key string, val int64) (int64, error)

func (*RedisClient) LLen

func (c *RedisClient) LLen(ctx context.Context, key string) (int64, error)

func (*RedisClient) LPop

func (c *RedisClient) LPop(ctx context.Context, key string) (string, error)

func (*RedisClient) LPush

func (c *RedisClient) LPush(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisClient) MGet

func (c *RedisClient) MGet(ctx context.Context, vals ...string) ([]interface{}, error)

func (*RedisClient) MSet

func (c *RedisClient) MSet(ctx context.Context, vals ...interface{}) (string, error)

func (*RedisClient) Pipeline

func (c *RedisClient) Pipeline(ctx context.Context) (iface goredis.Pipeliner)

func (*RedisClient) RPop

func (c *RedisClient) RPop(ctx context.Context, key string) (string, error)

func (*RedisClient) RPush

func (c *RedisClient) RPush(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisClient) SAdd

func (c *RedisClient) SAdd(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisClient) SCard

func (c *RedisClient) SCard(ctx context.Context, key string) (int64, error)

func (*RedisClient) SDiff

func (c *RedisClient) SDiff(ctx context.Context, vals ...string) ([]string, error)

func (*RedisClient) SIsMember

func (c *RedisClient) SIsMember(ctx context.Context, key string, iface interface{}) (bool, error)

func (*RedisClient) SMembers

func (c *RedisClient) SMembers(ctx context.Context, key string) ([]string, error)

func (*RedisClient) SRandMember

func (c *RedisClient) SRandMember(ctx context.Context, key string) (string, error)

func (*RedisClient) SRandMemberN

func (c *RedisClient) SRandMemberN(ctx context.Context, key string, i int64) ([]string, error)

func (*RedisClient) SRem

func (c *RedisClient) SRem(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisClient) Set

func (c *RedisClient) Set(ctx context.Context, key string, iface interface{}, i time.Duration) (string, error)

func (*RedisClient) SetBit

func (c *RedisClient) SetBit(ctx context.Context, key string, i int64, i1 int) (int64, error)

func (*RedisClient) SetNX

func (c *RedisClient) SetNX(ctx context.Context, key string, iface interface{}, i time.Duration) (bool, error)

func (*RedisClient) TTL

func (c *RedisClient) TTL(ctx context.Context, key string) (time.Duration, error)

func (*RedisClient) ZAdd

func (c *RedisClient) ZAdd(ctx context.Context, key string, vals ...goredis.Z) (int64, error)

func (*RedisClient) ZCard

func (c *RedisClient) ZCard(ctx context.Context, key string) (int64, error)

func (*RedisClient) ZRangeWithScores

func (c *RedisClient) ZRangeWithScores(ctx context.Context, key string, start, end int64) ([]goredis.Z, error)

func (*RedisClient) ZRem

func (c *RedisClient) ZRem(ctx context.Context, key string, vals ...interface{}) (int64, error)

type RedisInstance

type RedisInstance struct {
	Client *RedisClient
	Name   string
}

func (*RedisInstance) DelKey added in v1.0.0

func (r *RedisInstance) DelKey(ctx context.Context, key string) (int64, error)

func (*RedisInstance) GetKey

func (r *RedisInstance) GetKey(ctx context.Context, key string) (string, error)

func (*RedisInstance) HDel

func (r *RedisInstance) HDel(ctx context.Context, key string, vals ...string) (int64, error)

func (*RedisInstance) HExists

func (r *RedisInstance) HExists(ctx context.Context, key string, val string) (bool, error)

func (*RedisInstance) HGet

func (r *RedisInstance) HGet(ctx context.Context, key string, val string) (string, error)

func (*RedisInstance) HGetAll

func (r *RedisInstance) HGetAll(ctx context.Context, key string) (map[string]string, error)

func (*RedisInstance) HMGetKey

func (r *RedisInstance) HMGetKey(ctx context.Context, key string, vals ...string) ([]interface{}, error)

func (*RedisInstance) HMSetKey

func (r *RedisInstance) HMSetKey(ctx context.Context, key string, mdata map[string]interface{}) (string, error)

func (*RedisInstance) HSet

func (r *RedisInstance) HSet(ctx context.Context, key string, val string, iface interface{}) (bool, error)

func (*RedisInstance) Incr

func (r *RedisInstance) Incr(ctx context.Context, key string) (int64, error)

func (*RedisInstance) LPush

func (r *RedisInstance) LPush(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisInstance) SAdd

func (r *RedisInstance) SAdd(ctx context.Context, key string, vals ...interface{}) (int64, error)

func (*RedisInstance) SDiff

func (r *RedisInstance) SDiff(ctx context.Context, vals ...string) ([]string, error)

func (*RedisInstance) SIsMember

func (r *RedisInstance) SIsMember(ctx context.Context, key string, iface interface{}) (bool, error)

func (*RedisInstance) Select

func (r *RedisInstance) Select(ctx context.Context, db int) (*RedisInstance, error)

func (*RedisInstance) SetBit

func (r *RedisInstance) SetBit(ctx context.Context, key string, i int64, i1 int) (int64, error)

func (*RedisInstance) SetKey added in v1.0.0

func (r *RedisInstance) SetKey(ctx context.Context, key, val string, ttl time.Duration) (string, error)

func (*RedisInstance) SetNxKey added in v1.0.0

func (r *RedisInstance) SetNxKey(ctx context.Context, key, val string, ttl time.Duration) (bool, error)

func (*RedisInstance) TTL

func (r *RedisInstance) TTL(ctx context.Context, key string) (time.Duration, error)

type RedisKeys

type RedisKeys string

func (RedisKeys) Fmt

func (r RedisKeys) Fmt(params ...interface{}) string

func (RedisKeys) ToString

func (r RedisKeys) ToString() string

type TraceClient

type TraceClient struct {
	*Client
	// contains filtered or unexported fields
}

A TraceClient wraps redis with tracer.

func (*TraceClient) Append

func (c *TraceClient) Append(key string, val string) (cmd *redis.IntCmd)

func (*TraceClient) BLPop

func (c *TraceClient) BLPop(i time.Duration, vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) BRPop

func (c *TraceClient) BRPop(i time.Duration, vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) BRPopLPush

func (c *TraceClient) BRPopLPush(key string, val string, i time.Duration) (cmd *redis.StringCmd)

func (*TraceClient) BZPopMax

func (c *TraceClient) BZPopMax(i time.Duration, vals ...string) (cmd *redis.ZWithKeyCmd)

func (*TraceClient) BZPopMin

func (c *TraceClient) BZPopMin(i time.Duration, vals ...string) (cmd *redis.ZWithKeyCmd)

func (*TraceClient) BgRewriteAOF

func (c *TraceClient) BgRewriteAOF() (cmd *redis.StatusCmd)

func (*TraceClient) BgSave

func (c *TraceClient) BgSave() (cmd *redis.StatusCmd)

func (*TraceClient) BitCount

func (c *TraceClient) BitCount(key string, ptr *redis.BitCount) (cmd *redis.IntCmd)

func (*TraceClient) BitOpAnd

func (c *TraceClient) BitOpAnd(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) BitOpNot

func (c *TraceClient) BitOpNot(key string, val string) (cmd *redis.IntCmd)

func (*TraceClient) BitOpOr

func (c *TraceClient) BitOpOr(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) BitOpXor

func (c *TraceClient) BitOpXor(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) BitPos

func (c *TraceClient) BitPos(key string, i int64, vals ...int64) (cmd *redis.IntCmd)

func (*TraceClient) ClientGetName

func (c *TraceClient) ClientGetName() (cmd *redis.StringCmd)

func (*TraceClient) ClientID

func (c *TraceClient) ClientID() (cmd *redis.IntCmd)

func (*TraceClient) ClientKill

func (c *TraceClient) ClientKill(key string) (cmd *redis.StatusCmd)

func (*TraceClient) ClientKillByFilter

func (c *TraceClient) ClientKillByFilter(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) ClientList

func (c *TraceClient) ClientList() (cmd *redis.StringCmd)

func (*TraceClient) ClientPause

func (c *TraceClient) ClientPause(i time.Duration) (cmd *redis.BoolCmd)

func (*TraceClient) ClientUnblock

func (c *TraceClient) ClientUnblock(i int64) (cmd *redis.IntCmd)

func (*TraceClient) ClientUnblockWithError

func (c *TraceClient) ClientUnblockWithError(i int64) (cmd *redis.IntCmd)

func (*TraceClient) Close

func (c *TraceClient) Close() (err error)

func (*TraceClient) ClusterAddSlots

func (c *TraceClient) ClusterAddSlots(vals ...int) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterAddSlotsRange

func (c *TraceClient) ClusterAddSlotsRange(i int, i1 int) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterCountFailureReports

func (c *TraceClient) ClusterCountFailureReports(key string) (cmd *redis.IntCmd)

func (*TraceClient) ClusterCountKeysInSlot

func (c *TraceClient) ClusterCountKeysInSlot(i int) (cmd *redis.IntCmd)

func (*TraceClient) ClusterDelSlots

func (c *TraceClient) ClusterDelSlots(vals ...int) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterDelSlotsRange

func (c *TraceClient) ClusterDelSlotsRange(i int, i1 int) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterFailover

func (c *TraceClient) ClusterFailover() (cmd *redis.StatusCmd)

func (*TraceClient) ClusterForget

func (c *TraceClient) ClusterForget(key string) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterGetKeysInSlot

func (c *TraceClient) ClusterGetKeysInSlot(i int, i1 int) (cmd *redis.StringSliceCmd)

func (*TraceClient) ClusterInfo

func (c *TraceClient) ClusterInfo() (cmd *redis.StringCmd)

func (*TraceClient) ClusterKeySlot

func (c *TraceClient) ClusterKeySlot(key string) (cmd *redis.IntCmd)

func (*TraceClient) ClusterMeet

func (c *TraceClient) ClusterMeet(key string, val string) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterNodes

func (c *TraceClient) ClusterNodes() (cmd *redis.StringCmd)

func (*TraceClient) ClusterReplicate

func (c *TraceClient) ClusterReplicate(key string) (cmd *redis.StatusCmd)

func (*TraceClient) ClusterResetHard

func (c *TraceClient) ClusterResetHard() (cmd *redis.StatusCmd)

func (*TraceClient) ClusterResetSoft

func (c *TraceClient) ClusterResetSoft() (cmd *redis.StatusCmd)

func (*TraceClient) ClusterSaveConfig

func (c *TraceClient) ClusterSaveConfig() (cmd *redis.StatusCmd)

func (*TraceClient) ClusterSlaves

func (c *TraceClient) ClusterSlaves(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) ClusterSlots

func (c *TraceClient) ClusterSlots() (cmd *redis.ClusterSlotsCmd)

func (*TraceClient) Command

func (c *TraceClient) Command() (cmd *redis.CommandsInfoCmd)

func (*TraceClient) ConfigGet

func (c *TraceClient) ConfigGet(key string) (cmd *redis.SliceCmd)

func (*TraceClient) ConfigResetStat

func (c *TraceClient) ConfigResetStat() (cmd *redis.StatusCmd)

func (*TraceClient) ConfigRewrite

func (c *TraceClient) ConfigRewrite() (cmd *redis.StatusCmd)

func (*TraceClient) ConfigSet

func (c *TraceClient) ConfigSet(key string, val string) (cmd *redis.StatusCmd)

func (*TraceClient) Context

func (c *TraceClient) Context() (iface context.Context)

func (*TraceClient) DBSize

func (c *TraceClient) DBSize() (cmd *redis.IntCmd)

func (*TraceClient) DbSize

func (c *TraceClient) DbSize() (cmd *redis.IntCmd)

func (*TraceClient) DebugObject

func (c *TraceClient) DebugObject(key string) (cmd *redis.StringCmd)

func (*TraceClient) Decr

func (c *TraceClient) Decr(key string) (cmd *redis.IntCmd)

func (*TraceClient) DecrBy

func (c *TraceClient) DecrBy(key string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) Del

func (c *TraceClient) Del(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) Do

func (c *TraceClient) Do(vals ...interface{}) (cmd *redis.Cmd)

func (*TraceClient) Dump

func (c *TraceClient) Dump(key string) (cmd *redis.StringCmd)

func (*TraceClient) Echo

func (c *TraceClient) Echo(iface interface{}) (cmd *redis.StringCmd)

func (*TraceClient) Eval

func (c *TraceClient) Eval(key string, vals []string, vals1 ...interface{}) (cmd *redis.Cmd)

func (*TraceClient) EvalSha

func (c *TraceClient) EvalSha(key string, vals []string, vals1 ...interface{}) (cmd *redis.Cmd)

func (*TraceClient) Exists

func (c *TraceClient) Exists(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) Expire

func (c *TraceClient) Expire(key string, i time.Duration) (cmd *redis.BoolCmd)

func (*TraceClient) ExpireAt

func (c *TraceClient) ExpireAt(key string, t time.Time) (cmd *redis.BoolCmd)

func (*TraceClient) FlushAll

func (c *TraceClient) FlushAll() (cmd *redis.StatusCmd)

func (*TraceClient) FlushAllAsync

func (c *TraceClient) FlushAllAsync() (cmd *redis.StatusCmd)

func (*TraceClient) FlushDB

func (c *TraceClient) FlushDB() (cmd *redis.StatusCmd)

func (*TraceClient) FlushDBAsync

func (c *TraceClient) FlushDBAsync() (cmd *redis.StatusCmd)

func (*TraceClient) FlushDb

func (c *TraceClient) FlushDb() (cmd *redis.StatusCmd)

func (*TraceClient) GeoAdd

func (c *TraceClient) GeoAdd(key string, location ...*redis.GeoLocation) (cmd *redis.IntCmd)

func (*TraceClient) GeoDist

func (c *TraceClient) GeoDist(key string, val string, val1 string, val2 string) (cmd *redis.FloatCmd)

func (*TraceClient) GeoHash

func (c *TraceClient) GeoHash(key string, vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) GeoPos

func (c *TraceClient) GeoPos(key string, vals ...string) (cmd *redis.GeoPosCmd)

func (*TraceClient) GeoRadius

func (c *TraceClient) GeoRadius(key string, f float64, f1 float64, ptr *redis.GeoRadiusQuery) (cmd *redis.GeoLocationCmd)

func (*TraceClient) GeoRadiusByMember

func (c *TraceClient) GeoRadiusByMember(key string, val string, ptr *redis.GeoRadiusQuery) (cmd *redis.GeoLocationCmd)

func (*TraceClient) GeoRadiusByMemberRO

func (c *TraceClient) GeoRadiusByMemberRO(key string, val string, ptr *redis.GeoRadiusQuery) (cmd *redis.GeoLocationCmd)

func (*TraceClient) GeoRadiusRO

func (c *TraceClient) GeoRadiusRO(key string, f float64, f1 float64, ptr *redis.GeoRadiusQuery) (cmd *redis.GeoLocationCmd)

func (*TraceClient) Get

func (c *TraceClient) Get(key string) (cmd *redis.StringCmd)

func (*TraceClient) GetBit

func (c *TraceClient) GetBit(key string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) GetRange

func (c *TraceClient) GetRange(key string, i int64, i1 int64) (cmd *redis.StringCmd)

func (*TraceClient) GetSet

func (c *TraceClient) GetSet(key string, iface interface{}) (cmd *redis.StringCmd)

func (*TraceClient) HDel

func (c *TraceClient) HDel(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) HExists

func (c *TraceClient) HExists(key string, val string) (cmd *redis.BoolCmd)

func (*TraceClient) HGet

func (c *TraceClient) HGet(key string, val string) (cmd *redis.StringCmd)

func (*TraceClient) HGetAll

func (c *TraceClient) HGetAll(key string) (cmd *redis.StringStringMapCmd)

func (*TraceClient) HIncrBy

func (c *TraceClient) HIncrBy(key string, val string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) HIncrByFloat

func (c *TraceClient) HIncrByFloat(key string, val string, f float64) (cmd *redis.FloatCmd)

func (*TraceClient) HKeys

func (c *TraceClient) HKeys(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) HLen

func (c *TraceClient) HLen(key string) (cmd *redis.IntCmd)

func (*TraceClient) HMGet

func (c *TraceClient) HMGet(key string, vals ...string) (cmd *redis.SliceCmd)

func (*TraceClient) HMSet

func (c *TraceClient) HMSet(key string, mdata map[string]interface{}) (cmd *redis.StatusCmd)

func (*TraceClient) HScan

func (c *TraceClient) HScan(key string, n uint64, val string, i int64) (cmd *redis.ScanCmd)

func (*TraceClient) HSet

func (c *TraceClient) HSet(key string, val string, iface interface{}) (cmd *redis.BoolCmd)

func (*TraceClient) HSetNX

func (c *TraceClient) HSetNX(key string, val string, iface interface{}) (cmd *redis.BoolCmd)

func (*TraceClient) HVals

func (c *TraceClient) HVals(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) Incr

func (c *TraceClient) Incr(key string) (cmd *redis.IntCmd)

func (*TraceClient) IncrBy

func (c *TraceClient) IncrBy(key string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) IncrByFloat

func (c *TraceClient) IncrByFloat(key string, f float64) (cmd *redis.FloatCmd)

func (*TraceClient) Info

func (c *TraceClient) Info(vals ...string) (cmd *redis.StringCmd)

func (*TraceClient) Keys

func (c *TraceClient) Keys(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) LIndex

func (c *TraceClient) LIndex(key string, i int64) (cmd *redis.StringCmd)

func (*TraceClient) LInsert

func (c *TraceClient) LInsert(key string, val string, iface interface{}, iface1 interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LInsertAfter

func (c *TraceClient) LInsertAfter(key string, iface interface{}, iface1 interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LInsertBefore

func (c *TraceClient) LInsertBefore(key string, iface interface{}, iface1 interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LLen

func (c *TraceClient) LLen(key string) (cmd *redis.IntCmd)

func (*TraceClient) LPop

func (c *TraceClient) LPop(key string) (cmd *redis.StringCmd)

func (*TraceClient) LPush

func (c *TraceClient) LPush(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LPushX

func (c *TraceClient) LPushX(key string, iface interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LRange

func (c *TraceClient) LRange(key string, i int64, i1 int64) (cmd *redis.StringSliceCmd)

func (*TraceClient) LRem

func (c *TraceClient) LRem(key string, i int64, iface interface{}) (cmd *redis.IntCmd)

func (*TraceClient) LSet

func (c *TraceClient) LSet(key string, i int64, iface interface{}) (cmd *redis.StatusCmd)

func (*TraceClient) LTrim

func (c *TraceClient) LTrim(key string, i int64, i1 int64) (cmd *redis.StatusCmd)

func (*TraceClient) LastSave

func (c *TraceClient) LastSave() (cmd *redis.IntCmd)

func (*TraceClient) MGet

func (c *TraceClient) MGet(vals ...string) (cmd *redis.SliceCmd)

func (*TraceClient) MSet

func (c *TraceClient) MSet(vals ...interface{}) (cmd *redis.StatusCmd)

func (*TraceClient) MSetNX

func (c *TraceClient) MSetNX(vals ...interface{}) (cmd *redis.BoolCmd)

func (*TraceClient) MemoryUsage

func (c *TraceClient) MemoryUsage(key string, vals ...int) (cmd *redis.IntCmd)

func (*TraceClient) Migrate

func (c *TraceClient) Migrate(key string, val string, val1 string, i int64, i1 time.Duration) (cmd *redis.StatusCmd)

func (*TraceClient) Move

func (c *TraceClient) Move(key string, i int64) (cmd *redis.BoolCmd)

func (*TraceClient) ObjectEncoding

func (c *TraceClient) ObjectEncoding(key string) (cmd *redis.StringCmd)

func (*TraceClient) ObjectIdleTime

func (c *TraceClient) ObjectIdleTime(key string) (cmd *redis.DurationCmd)

func (*TraceClient) ObjectRefCount

func (c *TraceClient) ObjectRefCount(key string) (cmd *redis.IntCmd)

func (*TraceClient) Options

func (c *TraceClient) Options() (options *redis.Options)

func (*TraceClient) PExpire

func (c *TraceClient) PExpire(key string, i time.Duration) (cmd *redis.BoolCmd)

func (*TraceClient) PExpireAt

func (c *TraceClient) PExpireAt(key string, t time.Time) (cmd *redis.BoolCmd)

func (*TraceClient) PFAdd

func (c *TraceClient) PFAdd(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) PFCount

func (c *TraceClient) PFCount(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) PFMerge

func (c *TraceClient) PFMerge(key string, vals ...string) (cmd *redis.StatusCmd)

func (*TraceClient) PSubscribe

func (c *TraceClient) PSubscribe(vals ...string) (sub *redis.PubSub)

func (*TraceClient) PTTL

func (c *TraceClient) PTTL(key string) (cmd *redis.DurationCmd)

func (*TraceClient) Persist

func (c *TraceClient) Persist(key string) (cmd *redis.BoolCmd)

func (*TraceClient) Ping

func (c *TraceClient) Ping() (cmd *redis.StatusCmd)

func (*TraceClient) Pipeline

func (c *TraceClient) Pipeline() (iface redis.Pipeliner)

func (*TraceClient) Pipelined

func (c *TraceClient) Pipelined(fn func(redis.Pipeliner) error) (vals []redis.Cmder, err error)

func (*TraceClient) PoolStats

func (c *TraceClient) PoolStats() (stats *redis.PoolStats)

func (*TraceClient) Process

func (c *TraceClient) Process(iface redis.Cmder) (err error)

func (*TraceClient) PubSubChannels

func (c *TraceClient) PubSubChannels(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) PubSubNumPat

func (c *TraceClient) PubSubNumPat() (cmd *redis.IntCmd)

func (*TraceClient) PubSubNumSub

func (c *TraceClient) PubSubNumSub(vals ...string) (cmd *redis.StringIntMapCmd)

func (*TraceClient) Publish

func (c *TraceClient) Publish(key string, iface interface{}) (cmd *redis.IntCmd)

func (*TraceClient) Quit

func (c *TraceClient) Quit() (cmd *redis.StatusCmd)

func (*TraceClient) RPop

func (c *TraceClient) RPop(key string) (cmd *redis.StringCmd)

func (*TraceClient) RPopLPush

func (c *TraceClient) RPopLPush(key string, val string) (cmd *redis.StringCmd)

func (*TraceClient) RPush

func (c *TraceClient) RPush(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) RPushX

func (c *TraceClient) RPushX(key string, iface interface{}) (cmd *redis.IntCmd)

func (*TraceClient) RandomKey

func (c *TraceClient) RandomKey() (cmd *redis.StringCmd)

func (*TraceClient) ReadOnly

func (c *TraceClient) ReadOnly() (cmd *redis.StatusCmd)

func (*TraceClient) ReadWrite

func (c *TraceClient) ReadWrite() (cmd *redis.StatusCmd)

func (*TraceClient) Rename

func (c *TraceClient) Rename(key string, val string) (cmd *redis.StatusCmd)

func (*TraceClient) RenameNX

func (c *TraceClient) RenameNX(key string, val string) (cmd *redis.BoolCmd)

func (*TraceClient) Restore

func (c *TraceClient) Restore(key string, i time.Duration, val string) (cmd *redis.StatusCmd)

func (*TraceClient) RestoreReplace

func (c *TraceClient) RestoreReplace(key string, i time.Duration, val string) (cmd *redis.StatusCmd)

func (*TraceClient) SAdd

func (c *TraceClient) SAdd(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) SCard

func (c *TraceClient) SCard(key string) (cmd *redis.IntCmd)

func (*TraceClient) SDiff

func (c *TraceClient) SDiff(vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) SDiffStore

func (c *TraceClient) SDiffStore(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) SInter

func (c *TraceClient) SInter(vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) SInterStore

func (c *TraceClient) SInterStore(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) SIsMember

func (c *TraceClient) SIsMember(key string, iface interface{}) (cmd *redis.BoolCmd)

func (*TraceClient) SMembers

func (c *TraceClient) SMembers(key string) (cmd *redis.StringSliceCmd)

func (*TraceClient) SMembersMap

func (c *TraceClient) SMembersMap(key string) (cmd *redis.StringStructMapCmd)

func (*TraceClient) SMove

func (c *TraceClient) SMove(key string, val string, iface interface{}) (cmd *redis.BoolCmd)

func (*TraceClient) SPop

func (c *TraceClient) SPop(key string) (cmd *redis.StringCmd)

func (*TraceClient) SPopN

func (c *TraceClient) SPopN(key string, i int64) (cmd *redis.StringSliceCmd)

func (*TraceClient) SRandMember

func (c *TraceClient) SRandMember(key string) (cmd *redis.StringCmd)

func (*TraceClient) SRandMemberN

func (c *TraceClient) SRandMemberN(key string, i int64) (cmd *redis.StringSliceCmd)

func (*TraceClient) SRem

func (c *TraceClient) SRem(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) SScan

func (c *TraceClient) SScan(key string, n uint64, val string, i int64) (cmd *redis.ScanCmd)

func (*TraceClient) SUnion

func (c *TraceClient) SUnion(vals ...string) (cmd *redis.StringSliceCmd)

func (*TraceClient) SUnionStore

func (c *TraceClient) SUnionStore(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) Save

func (c *TraceClient) Save() (cmd *redis.StatusCmd)

func (*TraceClient) Scan

func (c *TraceClient) Scan(n uint64, val string, i int64) (cmd *redis.ScanCmd)

func (*TraceClient) ScriptExists

func (c *TraceClient) ScriptExists(vals ...string) (cmd *redis.BoolSliceCmd)

func (*TraceClient) ScriptFlush

func (c *TraceClient) ScriptFlush() (cmd *redis.StatusCmd)

func (*TraceClient) ScriptKill

func (c *TraceClient) ScriptKill() (cmd *redis.StatusCmd)

func (*TraceClient) ScriptLoad

func (c *TraceClient) ScriptLoad(key string) (cmd *redis.StringCmd)

func (*TraceClient) Set

func (c *TraceClient) Set(key string, iface interface{}, i time.Duration) (cmd *redis.StatusCmd)

func (*TraceClient) SetBit

func (c *TraceClient) SetBit(key string, i int64, i1 int) (cmd *redis.IntCmd)

func (*TraceClient) SetLimiter

func (c *TraceClient) SetLimiter(iface redis.Limiter) (client *redis.Client)

func (*TraceClient) SetNX

func (c *TraceClient) SetNX(key string, iface interface{}, i time.Duration) (cmd *redis.BoolCmd)

func (*TraceClient) SetRange

func (c *TraceClient) SetRange(key string, i int64, val string) (cmd *redis.IntCmd)

func (*TraceClient) SetXX

func (c *TraceClient) SetXX(key string, iface interface{}, i time.Duration) (cmd *redis.BoolCmd)

func (*TraceClient) Shutdown

func (c *TraceClient) Shutdown() (cmd *redis.StatusCmd)

func (*TraceClient) ShutdownNoSave

func (c *TraceClient) ShutdownNoSave() (cmd *redis.StatusCmd)

func (*TraceClient) ShutdownSave

func (c *TraceClient) ShutdownSave() (cmd *redis.StatusCmd)

func (*TraceClient) SlaveOf

func (c *TraceClient) SlaveOf(key string, val string) (cmd *redis.StatusCmd)

func (*TraceClient) SlowLog

func (c *TraceClient) SlowLog()

func (*TraceClient) Sort

func (c *TraceClient) Sort(key string, ptr *redis.Sort) (cmd *redis.StringSliceCmd)

func (*TraceClient) SortInterfaces

func (c *TraceClient) SortInterfaces(key string, ptr *redis.Sort) (cmd *redis.SliceCmd)

func (*TraceClient) SortStore

func (c *TraceClient) SortStore(key string, val string, ptr *redis.Sort) (cmd *redis.IntCmd)

func (*TraceClient) StrLen

func (c *TraceClient) StrLen(key string) (cmd *redis.IntCmd)

func (*TraceClient) String

func (c *TraceClient) String() (ret string)

func (*TraceClient) Subscribe

func (c *TraceClient) Subscribe(vals ...string) (sub *redis.PubSub)

func (*TraceClient) Sync

func (c *TraceClient) Sync()

func (*TraceClient) TTL

func (c *TraceClient) TTL(key string) (cmd *redis.DurationCmd)

func (*TraceClient) Time

func (c *TraceClient) Time() (cmd *redis.TimeCmd)

func (*TraceClient) Touch

func (c *TraceClient) Touch(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) TxPipeline

func (c *TraceClient) TxPipeline() (iface redis.Pipeliner)

func (*TraceClient) TxPipelined

func (c *TraceClient) TxPipelined(fn func(redis.Pipeliner) error) (vals []redis.Cmder, err error)

func (*TraceClient) Type

func (c *TraceClient) Type(key string) (cmd *redis.StatusCmd)
func (c *TraceClient) Unlink(vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) Wait

func (c *TraceClient) Wait(i int, i1 time.Duration) (cmd *redis.IntCmd)

func (*TraceClient) Watch

func (c *TraceClient) Watch(fn func(*redis.Tx) error, vals ...string) (err error)

func (*TraceClient) WithContext

func (c *TraceClient) WithContext(iface context.Context) (client *redis.Client)

func (*TraceClient) WrapProcess

func (c *TraceClient) WrapProcess(fn func(func(redis.Cmder) error) func(redis.Cmder) error)

func (*TraceClient) WrapProcessPipeline

func (c *TraceClient) WrapProcessPipeline(fn func(func([]redis.Cmder) error) func([]redis.Cmder) error)

func (*TraceClient) XAck

func (c *TraceClient) XAck(key string, val string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) XAdd

func (c *TraceClient) XAdd(ptr *redis.XAddArgs) (cmd *redis.StringCmd)

func (*TraceClient) XClaim

func (c *TraceClient) XClaim(ptr *redis.XClaimArgs) (cmd *redis.XMessageSliceCmd)

func (*TraceClient) XClaimJustID

func (c *TraceClient) XClaimJustID(ptr *redis.XClaimArgs) (cmd *redis.StringSliceCmd)

func (*TraceClient) XDel

func (c *TraceClient) XDel(key string, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) XGroupCreate

func (c *TraceClient) XGroupCreate(key string, val string, val1 string) (cmd *redis.StatusCmd)

func (*TraceClient) XGroupCreateMkStream

func (c *TraceClient) XGroupCreateMkStream(key string, val string, val1 string) (cmd *redis.StatusCmd)

func (*TraceClient) XGroupDelConsumer

func (c *TraceClient) XGroupDelConsumer(key string, val string, val1 string) (cmd *redis.IntCmd)

func (*TraceClient) XGroupDestroy

func (c *TraceClient) XGroupDestroy(key string, val string) (cmd *redis.IntCmd)

func (*TraceClient) XGroupSetID

func (c *TraceClient) XGroupSetID(key string, val string, val1 string) (cmd *redis.StatusCmd)

func (*TraceClient) XLen

func (c *TraceClient) XLen(key string) (cmd *redis.IntCmd)

func (*TraceClient) XPending

func (c *TraceClient) XPending(key string, val string) (cmd *redis.XPendingCmd)

func (*TraceClient) XPendingExt

func (c *TraceClient) XPendingExt(ptr *redis.XPendingExtArgs) (cmd *redis.XPendingExtCmd)

func (*TraceClient) XRange

func (c *TraceClient) XRange(key string, val string, val1 string) (cmd *redis.XMessageSliceCmd)

func (*TraceClient) XRangeN

func (c *TraceClient) XRangeN(key string, val string, val1 string, i int64) (cmd *redis.XMessageSliceCmd)

func (*TraceClient) XRead

func (c *TraceClient) XRead(ptr *redis.XReadArgs) (cmd *redis.XStreamSliceCmd)

func (*TraceClient) XReadGroup

func (c *TraceClient) XReadGroup(ptr *redis.XReadGroupArgs) (cmd *redis.XStreamSliceCmd)

func (*TraceClient) XReadStreams

func (c *TraceClient) XReadStreams(vals ...string) (cmd *redis.XStreamSliceCmd)

func (*TraceClient) XRevRange

func (c *TraceClient) XRevRange(key string, val string, val1 string) (cmd *redis.XMessageSliceCmd)

func (*TraceClient) XRevRangeN

func (c *TraceClient) XRevRangeN(key string, val string, val1 string, i int64) (cmd *redis.XMessageSliceCmd)

func (*TraceClient) XTrim

func (c *TraceClient) XTrim(key string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) XTrimApprox

func (c *TraceClient) XTrimApprox(key string, i int64) (cmd *redis.IntCmd)

func (*TraceClient) ZAdd

func (c *TraceClient) ZAdd(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZAddCh

func (c *TraceClient) ZAddCh(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZAddNX

func (c *TraceClient) ZAddNX(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZAddNXCh

func (c *TraceClient) ZAddNXCh(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZAddXX

func (c *TraceClient) ZAddXX(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZAddXXCh

func (c *TraceClient) ZAddXXCh(key string, z ...redis.Z) (cmd *redis.IntCmd)

func (*TraceClient) ZCard

func (c *TraceClient) ZCard(key string) (cmd *redis.IntCmd)

func (*TraceClient) ZCount

func (c *TraceClient) ZCount(key string, val string, val1 string) (cmd *redis.IntCmd)

func (*TraceClient) ZIncr

func (c *TraceClient) ZIncr(key string, v redis.Z) (cmd *redis.FloatCmd)

func (*TraceClient) ZIncrBy

func (c *TraceClient) ZIncrBy(key string, f float64, val string) (cmd *redis.FloatCmd)

func (*TraceClient) ZIncrNX

func (c *TraceClient) ZIncrNX(key string, v redis.Z) (cmd *redis.FloatCmd)

func (*TraceClient) ZIncrXX

func (c *TraceClient) ZIncrXX(key string, v redis.Z) (cmd *redis.FloatCmd)

func (*TraceClient) ZInterStore

func (c *TraceClient) ZInterStore(key string, v redis.ZStore, vals ...string) (cmd *redis.IntCmd)

func (*TraceClient) ZLexCount

func (c *TraceClient) ZLexCount(key string, val string, val1 string) (cmd *redis.IntCmd)

func (*TraceClient) ZPopMax

func (c *TraceClient) ZPopMax(key string, vals ...int64) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZPopMin

func (c *TraceClient) ZPopMin(key string, vals ...int64) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZRange

func (c *TraceClient) ZRange(key string, i int64, i1 int64) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRangeByLex

func (c *TraceClient) ZRangeByLex(key string, v redis.ZRangeBy) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRangeByScore

func (c *TraceClient) ZRangeByScore(key string, v redis.ZRangeBy) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRangeByScoreWithScores

func (c *TraceClient) ZRangeByScoreWithScores(key string, v redis.ZRangeBy) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZRangeWithScores

func (c *TraceClient) ZRangeWithScores(key string, i int64, i1 int64) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZRank

func (c *TraceClient) ZRank(key string, val string) (cmd *redis.IntCmd)

func (*TraceClient) ZRem

func (c *TraceClient) ZRem(key string, vals ...interface{}) (cmd *redis.IntCmd)

func (*TraceClient) ZRemRangeByLex

func (c *TraceClient) ZRemRangeByLex(key string, val string, val1 string) (cmd *redis.IntCmd)

func (*TraceClient) ZRemRangeByRank

func (c *TraceClient) ZRemRangeByRank(key string, i int64, i1 int64) (cmd *redis.IntCmd)

func (*TraceClient) ZRemRangeByScore

func (c *TraceClient) ZRemRangeByScore(key string, val string, val1 string) (cmd *redis.IntCmd)

func (*TraceClient) ZRevRange

func (c *TraceClient) ZRevRange(key string, i int64, i1 int64) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRevRangeByLex

func (c *TraceClient) ZRevRangeByLex(key string, v redis.ZRangeBy) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRevRangeByScore

func (c *TraceClient) ZRevRangeByScore(key string, v redis.ZRangeBy) (cmd *redis.StringSliceCmd)

func (*TraceClient) ZRevRangeByScoreWithScores

func (c *TraceClient) ZRevRangeByScoreWithScores(key string, v redis.ZRangeBy) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZRevRangeWithScores

func (c *TraceClient) ZRevRangeWithScores(key string, i int64, i1 int64) (cmd *redis.ZSliceCmd)

func (*TraceClient) ZRevRank

func (c *TraceClient) ZRevRank(key string, val string) (cmd *redis.IntCmd)

func (*TraceClient) ZScan

func (c *TraceClient) ZScan(key string, n uint64, val string, i int64) (cmd *redis.ScanCmd)

func (*TraceClient) ZScore

func (c *TraceClient) ZScore(key string, val string) (cmd *redis.FloatCmd)

func (*TraceClient) ZUnionStore

func (c *TraceClient) ZUnionStore(key string, v redis.ZStore, vals ...string) (cmd *redis.IntCmd)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL