Documentation
¶
Index ¶
- func AppendCmd(b []byte, cmd redis.Cmder) []byte
- func CmdString(cmd redis.Cmder) string
- func CmdsString(cmds []redis.Cmder) (string, string)
- func Marshal(value interface{}) ([]byte, error)
- func NewRedisClient(opts ...Option) *redis.Client
- func Unmarshal(byt []byte, ptr interface{}) (err error)
- type Cache
- func (c *Cache) BRPopLPush(source string, destination string, timeout time.Duration) string
- func (c *Cache) Decrement(key string, value int64) (int64, error)
- func (c *Cache) Delete(key ...string) int64
- func (c *Cache) Exists(keys ...string) int64
- func (c *Cache) Flush()
- func (c *Cache) Get(key string) interface{}
- func (c *Cache) GetLock(lockName string, acquireTimeout, lockTimeOut time.Duration) (string, error)
- func (c *Cache) GetString(key string) (string, error)
- func (c *Cache) HashAll(key string) map[string]string
- func (c *Cache) HashDel(key string, values ...string) int64
- func (c *Cache) HashExist(key, values string) bool
- func (c *Cache) HashGet(key, value string) string
- func (c *Cache) HashGets(key string, value ...string) []interface{}
- func (c *Cache) HashKeys(key string) []string
- func (c *Cache) HashLen(key string) int64
- func (c *Cache) HashSet(key string, values ...interface{}) int64
- func (c *Cache) Increment(key string, value int64) (int64, error)
- func (c *Cache) IncrementFloat(key string, value float64) (float64, error)
- func (c *Cache) IsExist(key string) bool
- func (c *Cache) LPush(key string, values ...interface{}) int64
- func (c *Cache) LRange(key string, start int64, stop int64) []string
- func (c *Cache) LRem(key string, count int64, value interface{}) int64
- func (c *Cache) Pipeline() redis.Pipeliner
- func (c *Cache) RPop(key string) string
- func (c *Cache) RPopLPush(source string, destination string) string
- func (c *Cache) ReleaseLock(lockName, code string) bool
- func (c *Cache) Scan(cursor uint64, match string, count int64) ([]string, uint64)
- func (c *Cache) Set(key string, value interface{}, timeout time.Duration) error
- func (c *Cache) SetEX(key string, value interface{}, timeout time.Duration) error
- func (c *Cache) SetNX(key string, value interface{}, expiration time.Duration) bool
- func (c *Cache) WithContext(ctx context.Context) cache.ICache
- func (c *Cache) WithDB(db int) cache.ICache
- func (c *Cache) XAck(key string, group string, ids ...string) int64
- func (c *Cache) XAdd(key, msgId string, trim bool, maxLength int64, value interface{}) string
- func (c *Cache) XAddKey(key, msgId string, trim bool, maxLength int64, vKey string, value interface{}) string
- func (c *Cache) XClaim(key string, group string, consumer string, id string, msIdle int64) []redis.XMessage
- func (c *Cache) XDel(key string, id ...string) int64
- func (c *Cache) XGroupCreateMkStream(key string, group string, start string) string
- func (c *Cache) XGroupDelConsumer(key string, group string, consumer string) int64
- func (c *Cache) XGroupDestroy(key string, group string) int64
- func (c *Cache) XGroupSetID(key string, group string, start string) string
- func (c *Cache) XInfoConsumers(key string, group string) []redis.XInfoConsumer
- func (c *Cache) XInfoGroups(key string) []redis.XInfoGroup
- func (c *Cache) XInfoStream(key string) *redis.XInfoStream
- func (c *Cache) XLen(key string) int64
- func (c *Cache) XPending(key string, group string) *redis.XPending
- func (c *Cache) XPendingExt(key string, group string, startId string, endId string, count int64, ...) []redis.XPendingExt
- func (c *Cache) XRange(key string, start string, stop string) []redis.XMessage
- func (c *Cache) XRangeN(key string, start string, stop string, count int64) []redis.XMessage
- func (c *Cache) XRead(key string, startId string, count int64, block int64) []redis.XMessage
- func (c *Cache) XReadGroup(key string, group string, consumer string, count int64, block int64, ...) []redis.XMessage
- func (c *Cache) XTrimMaxLen(key string, maxLen int64) int64
- func (c *Cache) ZAdd(key string, score float64, value ...interface{}) int64
- func (c *Cache) ZRangeByScore(key string, min int64, max int64, offset int64, count int64) []string
- func (c *Cache) ZRem(key string, value ...interface{}) int64
- type Option
- type TracingHook
- func (h *TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (h *TracingHook) AfterProcessPipeline(ctx context.Context, cmder []redis.Cmder) error
- func (h *TracingHook) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error)
- func (h *TracingHook) BeforeProcessPipeline(ctx context.Context, cmd []redis.Cmder) (context.Context, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdsString ¶
func NewRedisClient ¶ added in v0.2.15
func NewRedisClient(opts ...Option) *redis.Client
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) BRPopLPush ¶ added in v0.3.1
func (*Cache) IncrementFloat ¶
func (*Cache) ReleaseLock ¶
func (*Cache) XGroupCreateMkStream ¶ added in v0.2.15
func (*Cache) XGroupDelConsumer ¶ added in v0.2.15
func (*Cache) XGroupDestroy ¶ added in v0.2.15
func (*Cache) XGroupSetID ¶ added in v0.2.15
func (*Cache) XInfoConsumers ¶ added in v0.2.15
func (*Cache) XInfoGroups ¶ added in v0.2.15
func (*Cache) XInfoStream ¶ added in v0.2.15
func (*Cache) XPendingExt ¶ added in v0.2.15
func (*Cache) XReadGroup ¶ added in v0.2.15
func (*Cache) XTrimMaxLen ¶ added in v0.2.15
func (*Cache) ZRangeByScore ¶ added in v0.2.7
type Option ¶
type Option func(p *config)
func WithAttributes ¶
WithAttributes specifies additional attributes to be added to the span.
func WithTracer ¶
WithTracer specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type TracingHook ¶
type TracingHook struct {
// contains filtered or unexported fields
}
func (*TracingHook) AfterProcess ¶
func (h *TracingHook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
func (*TracingHook) AfterProcessPipeline ¶
func (h *TracingHook) AfterProcessPipeline(ctx context.Context, cmder []redis.Cmder) error
func (*TracingHook) BeforeProcess ¶
func (*TracingHook) BeforeProcessPipeline ¶
Click to show internal directories.
Click to hide internal directories.