storage

package
v0.0.0-...-6f2359a Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is thrown when the key does not exist
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type RedisStorage

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

RedisStorage is a KV store

func NewRedis

func NewRedis(client redisClient) *RedisStorage

NewRedis returns a new RedisStorage

func (*RedisStorage) Del

func (r *RedisStorage) Del(key string) error

Del deletes a key from the store

func (*RedisStorage) Get

func (r *RedisStorage) Get(key string) (string, error)

Get fetches a value from the store

func (*RedisStorage) Set

func (r *RedisStorage) Set(key, value string) error

Set set's a key to a given value

Jump to

Keyboard shortcuts

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