Documentation
¶
Index ¶
- func MatchFilter(patterns []string, key string) bool
- type Empty
- type KRedis
- func (mr *KRedis) Del(keys ...string) (int64, error)
- func (mr *KRedis) Do(args ...interface{}) (interface{}, error)
- func (mr *KRedis) Dump(key string) (string, error)
- func (mr *KRedis) Exist(key string) (bool, error)
- func (mr *KRedis) Get(key string) (interface{}, error)
- func (that *KRedis) HDel(key string, fields []string) error
- func (that *KRedis) HExists(key string, field string) (bool, error)
- func (that *KRedis) HGet(key string, field string) (interface{}, error)
- func (that *KRedis) HGetAll(key string) (map[string]string, error)
- func (that *KRedis) HKeys(ctx context.Context, key string) ([]string, error)
- func (that *KRedis) HLen(key string) (int64, error)
- func (that *KRedis) HMGet(key string, fields []string) ([]interface{}, error)
- func (that *KRedis) HMSet(key string, fields map[string]interface{}) error
- func (that *KRedis) HSet(key string, field string, value interface{}) error
- func (that *KRedis) HSetAll(key string, fields map[string]interface{}) error
- func (that *KRedis) HSetNX(ctx context.Context, key, field string, value interface{}) (bool, error)
- func (that *KRedis) HVals(ctx context.Context, key string) ([]string, error)
- func (that *KRedis) LIndex(key string, index int64) (string, error)
- func (that *KRedis) LInsert(key string, position string, pivot interface{}, value interface{}) (int64, error)
- func (that *KRedis) LLen(key string) (int64, error)
- func (that *KRedis) LPop(key string) (string, error)
- func (that *KRedis) LPush(key string, values ...interface{}) (int64, error)
- func (that *KRedis) LPushX(key string, values ...interface{}) (int64, error)
- func (that *KRedis) LRange(key string, start int64, stop int64) ([]string, error)
- func (that *KRedis) LRem(key string, count int64, value interface{}) (int64, error)
- func (that *KRedis) LSet(key string, index int64, value interface{}) error
- func (that *KRedis) LTrim(key string, start int64, stop int64) error
- func (mr *KRedis) PSubscribe(timeout int, callback func(err error, topic string, payload interface{}), ...)
- func (mr *KRedis) PSubscribeWithChanSize(timeout int, chanSize int, ...)
- func (mr *KRedis) PTTL(key string) (time.Duration, error)
- func (mr *KRedis) Ping() bool
- func (mr *KRedis) Pipeline() redisHd.Pipeliner
- func (mr *KRedis) Publish(topic string, payload interface{}) error
- func (that *KRedis) RPop(key string) (string, error)
- func (that *KRedis) RPush(key string, values ...interface{}) (int64, error)
- func (that *KRedis) RPushX(key string, values ...interface{}) (int64, error)
- func (mr *KRedis) Restore(key string, ttl time.Duration, value string) (string, error)
- func (mr *KRedis) RestoreReplace(key string, ttl time.Duration, value string) (string, error)
- func (that *KRedis) SAdd(key string, members ...interface{}) (int64, error)
- func (that *KRedis) SCard(key string) (int64, error)
- func (that *KRedis) SDiff(keys ...string) ([]string, error)
- func (that *KRedis) SDiffStore(destKey string, keys ...string) (int64, error)
- func (that *KRedis) SInter(keys ...string) ([]string, error)
- func (that *KRedis) SInterStore(destKey string, keys ...string) (int64, error)
- func (that *KRedis) SIsMember(key string, member interface{}) (bool, error)
- func (that *KRedis) SMembers(key string) ([]string, error)
- func (that *KRedis) SMove(source, destination string, member interface{}) (bool, error)
- func (that *KRedis) SPop(key string) (string, error)
- func (that *KRedis) SPopN(key string, count int64) ([]string, error)
- func (that *KRedis) SRandMember(key string) (string, error)
- func (that *KRedis) SRem(key string, members ...interface{}) (int64, error)
- func (that *KRedis) SUnion(keys ...string) ([]string, error)
- func (that *KRedis) SUnionStore(destKey string, keys ...string) (int64, error)
- func (mr *KRedis) Scan(limit int, aboutTypes []string, ignoreKeys []string, includeKeys []string, ...) ([]*RedisRecord, error)
- func (mr *KRedis) ScanMatch(limit int, aboutTypes []string, ignoreKeys []string, includeKeys []string, ...) ([]*RedisRecord, error)
- func (mr *KRedis) Set(key string, value interface{}, duration time.Duration) (bool, error)
- func (mr *KRedis) Stop()
- func (mr *KRedis) Subscribe(timeout int, callback func(err error, topic string, payload interface{}), ...)
- func (mr *KRedis) SubscribeLow(callback func(err error, topic string, payload interface{}), topics ...string)
- func (mr *KRedis) SubscribeWithoutTimeout(callback func(err error, topic string, payload interface{}), topics ...string)
- func (mr *KRedis) TTL(key string) (time.Duration, error)
- func (mr *KRedis) Type(key string) (string, error)
- type RedisMessage
- type RedisMessagePackConstraints
- type RedisRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchFilter ¶
Types ¶
type KRedis ¶
func (*KRedis) LInsert ¶
func (that *KRedis) LInsert(key string, position string, pivot interface{}, value interface{}) (int64, error)
在指定位置插入数据,在头部插入用"before",尾部插入用"after"
func (*KRedis) PSubscribe ¶
func (mr *KRedis) PSubscribe(timeout int, callback func(err error, topic string, payload interface{}), topics ...string)
从指定topic订阅消息, topic支持通配符, timeout 设置轮询超时时间, 单位ms; callback为接收消息的回调函数; topics为需要订阅的topic
func (*KRedis) PSubscribeWithChanSize ¶
func (mr *KRedis) PSubscribeWithChanSize(timeout int, chanSize int, callback func(err error, topic string, payload interface{}), topics ...string)
从指定topic订阅消息, topic支持通配符, timeout 设置轮询超时时间, 单位ms; chanSize 最大允许队列大小, 如果< 100, 则为100; callback为接收消息的回调函数; topics为需要订阅的topic
func (*KRedis) RestoreReplace ¶
func (*KRedis) SDiffStore ¶
func (*KRedis) SInterStore ¶
func (*KRedis) SUnionStore ¶
func (*KRedis) Scan ¶
func (mr *KRedis) Scan(limit int, aboutTypes []string, ignoreKeys []string, includeKeys []string, needDel bool, logf klogger.AppLogFunc) ([]*RedisRecord, error)
func (*KRedis) ScanMatch ¶
func (mr *KRedis) ScanMatch(limit int, aboutTypes []string, ignoreKeys []string, includeKeys []string, needDel bool, logf klogger.AppLogFunc) ([]*RedisRecord, error)
func (*KRedis) Subscribe ¶
func (mr *KRedis) Subscribe(timeout int, callback func(err error, topic string, payload interface{}), topics ...string)
从指定topic订阅消息, timeout 设置轮询超时时间, 单位ms; callback为接收消息的回调函数; topics为需要订阅的topic
func (*KRedis) SubscribeLow ¶
func (mr *KRedis) SubscribeLow(callback func(err error, topic string, payload interface{}), topics ...string)
从指定topic订阅消息, 底层API, 最好使用Subscribe替代
type RedisMessage ¶
type RedisMessagePackConstraints ¶
type RedisMessagePackConstraints interface {
RedisRecord | RedisMessage
}
Click to show internal directories.
Click to hide internal directories.