redis

package
v0.0.0-...-21a16ac Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Nil = redis.Nil

Variables

This section is empty.

Functions

func IsRedisJsonKeyDoesNotExistError

func IsRedisJsonKeyDoesNotExistError(err error) bool

func IsRedisJsonPathDoesNotExistError

func IsRedisJsonPathDoesNotExistError(err error) bool

func RedisJsonArrAppend

func RedisJsonArrAppend(c RedisProcesser, ctx context.Context, key string, path string, value interface{}) *redis.StatusCmd

func RedisJsonArrPop

func RedisJsonArrPop(c RedisProcesser, ctx context.Context, key string, path string, index int) *redis.StringCmd

func RedisJsonArrTrim

func RedisJsonArrTrim(c RedisProcesser, ctx context.Context, key string, path string, start int, end int) *redis.StatusCmd

func RedisJsonDel

func RedisJsonDel(c RedisProcesser, ctx context.Context, key string, path string) *redis.IntCmd

func RedisJsonGet

func RedisJsonGet(c RedisProcesser, ctx context.Context, key string, path string) *redis.StringCmd

func RedisJsonNumIncrBy

func RedisJsonNumIncrBy(c RedisProcesser, ctx context.Context, key string, path string, value int64) *redis.StringCmd

func RedisJsonSet

func RedisJsonSet(c RedisProcesser, ctx context.Context, key string, path string, value interface{}) *redis.StatusCmd

func RedisZAddLt

func RedisZAddLt(c RedisProcesser, ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd

Types

type Cmdable

type Cmdable = redis.Cmdable

type Options

type Options = redis.Options

type Pipeliner

type Pipeliner = redis.Pipeliner

type RedisClient

type RedisClient interface {
	redis.UniversalClient
	JsonGet(ctx context.Context, key string, path string) *redis.StringCmd
	JsonSet(ctx context.Context, key string, path string, data interface{}) *redis.StatusCmd
	JsonNumIncrBy(ctx context.Context, key string, path string, value int64) *redis.StringCmd
	ZAddLt(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd
	TsCreate(ctx context.Context, key string, retention int64) *redis.StatusCmd
	TsInfo(ctx context.Context, key string) *redis.SliceCmd
	TsAdd(ctx context.Context, key string, timestamp, value int64) *redis.StatusCmd
	TsRange(ctx context.Context, key string, from, to int64) ([]*TimeseriesDataPoint, error)
	TsRangeAggr(ctx context.Context, key string, from, to int64, aggrType string, timeBucket int64) ([]*TimeseriesDataPoint, error)
	NewMutex(name string, options ...redsync.Option) *redsync.Mutex
	AddDebugHook()
}

func NewRedisClient

func NewRedisClient(opt *Options) RedisClient

type RedisProcesser

type RedisProcesser interface {
	Process(ctx context.Context, cmd redis.Cmder) error
}

type TimeseriesDataPoint

type TimeseriesDataPoint struct {
	Timestamp int64
	Value     float64
}

type Tx

type Tx = redis.Tx

type Z

type Z = redis.Z

Jump to

Keyboard shortcuts

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