mredis

package
v0.0.0-...-afa1830 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleKeyRedis

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

SimpleKeyRedis manages operations with simple key/value storage in redis

func NewSimpleKeyRedis

func NewSimpleKeyRedis(redConn *redis.Client) SimpleKeyRedis

NewSimpleKeyRedis handles the creation of a SimpleKeyRedis object

func (*SimpleKeyRedis) Flush

func (skr *SimpleKeyRedis) Flush(ctx context.Context, key string) error

Flush the received key without caring about the key existency

func (*SimpleKeyRedis) Get

func (skr *SimpleKeyRedis) Get(ctx context.Context, key string) ([]byte, error)

Get a key value

func (*SimpleKeyRedis) MustFind

func (skr *SimpleKeyRedis) MustFind(ctx context.Context, matchKey string) ([][]byte, error)

MustFind at least one key value matching matchKey

func (*SimpleKeyRedis) Set

func (skr *SimpleKeyRedis) Set(ctx context.Context, key string, value []byte, keyExpiration time.Duration) error

Set a key expiring in keyExpiration

Jump to

Keyboard shortcuts

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