redis

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitCount added in v0.0.7

func BitCount(ctx context.Context, client redis.Cmdable, key string) (count int64, err error)

func Del added in v0.0.7

func Del(ctx context.Context, client redis.Cmdable, key string) (count int, err error)

func DelPattern added in v0.0.7

func DelPattern(ctx context.Context, client redis.Cmdable, database int, pattern string) (count int, err error)

func Exists added in v0.0.7

func Exists(ctx context.Context, client redis.Cmdable, key string) (res int64, err error)

func Expire added in v0.0.7

func Expire(ctx context.Context, client redis.Cmdable, key string, expire int64) (res bool, err error)

Expire 让给定键在指定的秒数之后过期

func HDel added in v0.0.7

func HDel(ctx context.Context, client redis.Cmdable, key string, field string) (err error)

func HGet added in v0.0.7

func HGet(ctx context.Context, client redis.Cmdable, key string, field string) (value string, err error)

func HSet added in v0.0.7

func HSet(ctx context.Context, client redis.Cmdable, key string, field string, value string) (err error)

func Info added in v0.0.7

func Info(ctx context.Context, client redis.Cmdable) (res string, err error)

func LPush added in v0.0.7

func LPush(ctx context.Context, client redis.Cmdable, key string, value string) (err error)

func LRem added in v0.0.7

func LRem(ctx context.Context, client redis.Cmdable, key string, count int64, value string) (err error)

func LSet added in v0.0.7

func LSet(ctx context.Context, client redis.Cmdable, key string, index int64, value string) (err error)

func MemoryUsage added in v0.0.7

func MemoryUsage(ctx context.Context, client redis.Cmdable, key string) (size int64, err error)

func Persist added in v0.0.7

func Persist(ctx context.Context, client redis.Cmdable, key string) (res bool, err error)

Persist 移除键的过期时间

func RPush added in v0.0.7

func RPush(ctx context.Context, client redis.Cmdable, key string, value string) (err error)

func SAdd added in v0.0.7

func SAdd(ctx context.Context, client redis.Cmdable, key string, value string) (err error)

func SRem added in v0.0.7

func SRem(ctx context.Context, client redis.Cmdable, key string, value string) (err error)

func Set added in v0.0.7

func Set(ctx context.Context, client redis.Cmdable, key string, value string) (err error)

func SetBit added in v0.0.7

func SetBit(ctx context.Context, client redis.Cmdable, key string, offset int64, value int) (err error)

func TTL added in v0.0.7

func TTL(ctx context.Context, client redis.Cmdable, key string) (res int64, err error)

TTL 查看给定键距离过期还有多少秒

func ValueType added in v0.0.7

func ValueType(ctx context.Context, client redis.Cmdable, key string) (ValueType string, err error)

Types

type ClusterService added in v0.0.7

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

func CreateClusterService added in v0.0.7

func CreateClusterService(servers []string, username string, auth string, certPath string) (service *ClusterService, err error)

func (*ClusterService) Del added in v0.0.7

func (this_ *ClusterService) Del(ctx context.Context, database int, key string) (count int, err error)

func (*ClusterService) DelPattern added in v0.0.7

func (this_ *ClusterService) DelPattern(ctx context.Context, database int, pattern string) (count int, err error)

func (*ClusterService) Exists added in v0.0.7

func (this_ *ClusterService) Exists(ctx context.Context, database int, key string) (res int64, err error)

func (*ClusterService) Expire added in v0.0.7

func (this_ *ClusterService) Expire(ctx context.Context, database int, key string, expire int64) (res bool, err error)

func (*ClusterService) Get added in v0.0.7

func (this_ *ClusterService) Get(ctx context.Context, database int, key string, valueStart, valueSize int64) (valueInfo *ValueInfo, err error)

func (*ClusterService) GetClient added in v0.0.7

func (this_ *ClusterService) GetClient(ctx context.Context, database int) (client redis.Cmdable, err error)

func (*ClusterService) GetLastUseTime added in v0.0.7

func (this_ *ClusterService) GetLastUseTime() int64

func (*ClusterService) GetWaitTime added in v0.0.7

func (this_ *ClusterService) GetWaitTime() int64

func (*ClusterService) HDel added in v0.0.7

func (this_ *ClusterService) HDel(ctx context.Context, database int, key string, field string) (err error)

func (*ClusterService) HSet added in v0.0.7

func (this_ *ClusterService) HSet(ctx context.Context, database int, key string, field string, value string) (err error)

func (*ClusterService) Info added in v0.0.7

func (this_ *ClusterService) Info(ctx context.Context) (res string, err error)

func (*ClusterService) Keys added in v0.0.7

func (this_ *ClusterService) Keys(ctx context.Context, database int, pattern string, size int64) (keysResult *KeysResult, err error)

func (*ClusterService) LPush added in v0.0.7

func (this_ *ClusterService) LPush(ctx context.Context, database int, key string, value string) (err error)

func (*ClusterService) LRem added in v0.0.7

func (this_ *ClusterService) LRem(ctx context.Context, database int, key string, count int64, value string) (err error)

func (*ClusterService) LSet added in v0.0.7

func (this_ *ClusterService) LSet(ctx context.Context, database int, key string, index int64, value string) (err error)

func (*ClusterService) Persist added in v0.0.7

func (this_ *ClusterService) Persist(ctx context.Context, database int, key string) (res bool, err error)

func (*ClusterService) RPush added in v0.0.7

func (this_ *ClusterService) RPush(ctx context.Context, database int, key string, value string) (err error)

func (*ClusterService) SAdd added in v0.0.7

func (this_ *ClusterService) SAdd(ctx context.Context, database int, key string, value string) (err error)

func (*ClusterService) SRem added in v0.0.7

func (this_ *ClusterService) SRem(ctx context.Context, database int, key string, value string) (err error)

func (*ClusterService) Set added in v0.0.7

func (this_ *ClusterService) Set(ctx context.Context, database int, key string, value string) (err error)

func (*ClusterService) SetLastUseTime added in v0.0.7

func (this_ *ClusterService) SetLastUseTime()

func (*ClusterService) Stop added in v0.0.7

func (this_ *ClusterService) Stop()

func (*ClusterService) TTL added in v0.0.7

func (this_ *ClusterService) TTL(ctx context.Context, database int, key string) (res int64, err error)

type IService

type IService interface {
}

type KeyInfo added in v0.0.7

type KeyInfo struct {
	Database int    `json:"database"`
	Key      string `json:"key"`
}

type KeysResult added in v0.0.7

type KeysResult struct {
	Count   int        `json:"count"`
	KeyList []*KeyInfo `json:"keyList"`
}

func ClusterKeys added in v0.0.7

func ClusterKeys(ctx context.Context, client *redis.ClusterClient, database int, pattern string, size int64) (keysResult *KeysResult, err error)

func Keys added in v0.0.7

func Keys(ctx context.Context, client redis.Cmdable, database int, pattern string, size int64) (keysResult *KeysResult, err error)

type V8Service added in v0.0.7

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

func CreateRedisService added in v0.0.7

func CreateRedisService(address string, username string, auth string, certPath string) (service *V8Service, err error)

func (*V8Service) Del added in v0.0.7

func (this_ *V8Service) Del(ctx context.Context, database int, key string) (count int, err error)

func (*V8Service) DelPattern added in v0.0.7

func (this_ *V8Service) DelPattern(ctx context.Context, database int, pattern string) (count int, err error)

func (*V8Service) Exists added in v0.0.7

func (this_ *V8Service) Exists(ctx context.Context, database int, key string) (res int64, err error)

func (*V8Service) Expire added in v0.0.7

func (this_ *V8Service) Expire(ctx context.Context, database int, key string, expire int64) (res bool, err error)

func (*V8Service) Get added in v0.0.7

func (this_ *V8Service) Get(ctx context.Context, database int, key string, valueStart, valueSize int64) (valueInfo *ValueInfo, err error)

func (*V8Service) GetClient added in v0.0.7

func (this_ *V8Service) GetClient(ctx context.Context, database int) (client redis.Cmdable, err error)

func (*V8Service) GetLastUseTime added in v0.0.7

func (this_ *V8Service) GetLastUseTime() int64

func (*V8Service) GetWaitTime added in v0.0.7

func (this_ *V8Service) GetWaitTime() int64

func (*V8Service) HDel added in v0.0.7

func (this_ *V8Service) HDel(ctx context.Context, database int, key string, field string) (err error)

func (*V8Service) HSet added in v0.0.7

func (this_ *V8Service) HSet(ctx context.Context, database int, key string, field string, value string) (err error)

func (*V8Service) Info added in v0.0.7

func (this_ *V8Service) Info(ctx context.Context) (res string, err error)

func (*V8Service) Keys added in v0.0.7

func (this_ *V8Service) Keys(ctx context.Context, database int, pattern string, size int64) (keysResult *KeysResult, err error)

func (*V8Service) LPush added in v0.0.7

func (this_ *V8Service) LPush(ctx context.Context, database int, key string, value string) (err error)

func (*V8Service) LRem added in v0.0.7

func (this_ *V8Service) LRem(ctx context.Context, database int, key string, count int64, value string) (err error)

func (*V8Service) LSet added in v0.0.7

func (this_ *V8Service) LSet(ctx context.Context, database int, key string, index int64, value string) (err error)

func (*V8Service) Persist added in v0.0.7

func (this_ *V8Service) Persist(ctx context.Context, database int, key string) (res bool, err error)

func (*V8Service) RPush added in v0.0.7

func (this_ *V8Service) RPush(ctx context.Context, database int, key string, value string) (err error)

func (*V8Service) SAdd added in v0.0.7

func (this_ *V8Service) SAdd(ctx context.Context, database int, key string, value string) (err error)

func (*V8Service) SRem added in v0.0.7

func (this_ *V8Service) SRem(ctx context.Context, database int, key string, value string) (err error)

func (*V8Service) Set added in v0.0.7

func (this_ *V8Service) Set(ctx context.Context, database int, key string, value string) (err error)

func (*V8Service) SetLastUseTime added in v0.0.7

func (this_ *V8Service) SetLastUseTime()

func (*V8Service) Stop added in v0.0.7

func (this_ *V8Service) Stop()

func (*V8Service) TTL added in v0.0.7

func (this_ *V8Service) TTL(ctx context.Context, database int, key string) (res int64, err error)

type ValueInfo added in v0.0.7

type ValueInfo struct {
	Database    int         `json:"database"`
	Key         string      `json:"key"`
	ValueType   string      `json:"valueType"`
	Value       interface{} `json:"value"`
	ValueCount  int64       `json:"valueCount"`
	ValueStart  int64       `json:"valueStart"`
	ValueEnd    int64       `json:"valueEnd"`
	Cursor      uint64      `json:"cursor"`
	MemoryUsage int64       `json:"memoryUsage"`
	TTL         int64       `json:"ttl"`
}

func Get added in v0.0.7

func Get(ctx context.Context, client redis.Cmdable, database int, key string, valueStart, valueSize int64) (valueInfo *ValueInfo, err error)

Jump to

Keyboard shortcuts

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