cache

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisClients

func NewRedisClients(clients map[RDB]*Client)

Types

type Client

type Client struct {
	C   *redis.Client //nolint:typecheck
	Ctx context.Context
}

func NewRedisClient

func NewRedisClient(n int) *Client

func (Client) ClientGetName

func (c Client) ClientGetName() *redis.StringCmd

ClientGetName returns the name of the connection.

func (Client) Del

func (c Client) Del(keys ...string) *redis.IntCmd

func (Client) Dump

func (c Client) Dump(key string) *redis.StringCmd

func (Client) Echo

func (c Client) Echo(message interface{}) *redis.StringCmd

func (Client) Exists

func (c Client) Exists(keys ...string) *redis.IntCmd

func (Client) Expire

func (c Client) Expire(key string, expiration time.Duration) *redis.BoolCmd

func (Client) ExpireAt

func (c Client) ExpireAt(key string, tm time.Time) *redis.BoolCmd

func (Client) ExpireGT

func (c Client) ExpireGT(key string, expiration time.Duration) *redis.BoolCmd

func (Client) ExpireLT

func (c Client) ExpireLT(key string, expiration time.Duration) *redis.BoolCmd

func (Client) ExpireNX

func (c Client) ExpireNX(key string, expiration time.Duration) *redis.BoolCmd

func (Client) ExpireTime

func (c Client) ExpireTime(key string) *redis.DurationCmd

func (Client) ExpireXX

func (c Client) ExpireXX(key string, expiration time.Duration) *redis.BoolCmd

func (Client) Ping

func (c Client) Ping() *redis.StatusCmd
func (c Client) Unlink(keys ...string) *redis.IntCmd

func (Client) ZAddNX

func (c Client) ZAddNX(key string, members ...redis.Z) *redis.IntCmd

func (Client) ZRange

func (c Client) ZRange(key string, start, stop int64) *redis.StringSliceCmd

func (Client) ZRemRangeByScore

func (c Client) ZRemRangeByScore(key, min, max string) *redis.IntCmd

type RDB

type RDB uint8
const (
	Feed RDB = iota
	Comment
	Favorite
	Message
	Publish
	Follow
	Follower
	Friend
	User
	IPLimit
)

Jump to

Keyboard shortcuts

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