cache

package
v0.0.0-...-d9c52e5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(addr, username, password string, db int) *Cache

func (*Cache) Decr

func (c *Cache) Decr(ctx context.Context, key string) (int64, error)

func (*Cache) DeleteKey

func (c *Cache) DeleteKey(ctx context.Context, key string) error

func (*Cache) DeleteKeyOld

func (c *Cache) DeleteKeyOld(ctx context.Context, key string) (int64, error)

func (*Cache) GetKey

func (c *Cache) GetKey(ctx context.Context, key string) (string, error)

func (*Cache) Incr

func (c *Cache) Incr(ctx context.Context, key string) (int64, error)

func (*Cache) SAdd

func (c *Cache) SAdd(ctx context.Context, setKey string, member interface{}) error

SAdd adds a member to a Redis set.

func (*Cache) SIsMember

func (c *Cache) SIsMember(ctx context.Context, setKey string, member interface{}) (bool, error)

SIsMember checks if a member is in a Redis set.

func (*Cache) SRem

func (c *Cache) SRem(ctx context.Context, setKey string, member interface{}) error

SRem removes a member from a Redis set.

func (*Cache) SetKey

func (c *Cache) SetKey(ctx context.Context, key string, value interface{}, expiration time.Duration) error

func (*Cache) XAck

func (c *Cache) XAck(ctx context.Context, stream, group, id string) (int64, error)

func (*Cache) XAdd

func (c *Cache) XAdd(ctx context.Context, stream, id string, values map[string]interface{}) (string, error)

func (*Cache) XGroupCreate

func (c *Cache) XGroupCreate(ctx context.Context, stream, group, start string) error

func (*Cache) XRead

func (c *Cache) XRead(ctx context.Context, streams []string, count int64, block time.Duration) ([]redis.XStream, error)

Jump to

Keyboard shortcuts

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