dredis

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(address, password string) dcomponent.Cache

func NewLock

func NewLock(address, password string) *redisDLock

Types

type Cache

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

func (*Cache) DelSetMember

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

func (*Cache) Delete

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

func (*Cache) Exist

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

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string, value interface{}) error

func (*Cache) GetHash

func (c *Cache) GetHash(ctx context.Context, key, field string, value interface{}) error

func (*Cache) GetList

func (c *Cache) GetList(ctx context.Context, key string, value interface{}) error

func (*Cache) IsSetMember

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

func (*Cache) Keys

func (c *Cache) Keys(ctx context.Context, pattern string) ([]string, error)

func (*Cache) MGet

func (c *Cache) MGet(ctx context.Context, keys []string, value interface{}) error

func (*Cache) Name

func (c *Cache) Name() string

func (*Cache) Set

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

func (*Cache) SetAdd

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

func (*Cache) SetHash

func (c *Cache) SetHash(ctx context.Context, key, field string, value interface{}) error

func (*Cache) SetList

func (c *Cache) SetList(ctx context.Context, key string, value interface{}) error

func (*Cache) SetNX

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

func (*Cache) UpdateExpire

func (c *Cache) UpdateExpire(ctx context.Context, key string, expire time.Duration) error

Jump to

Keyboard shortcuts

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