Version: v3.0.0+incompatible Latest Latest

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

Go to latest
Published: Oct 24, 2017 License: MIT Imports: 3 Imported by: 2




This section is empty.


This section is empty.


This section is empty.


type Engine

type Engine struct {
	// contains filtered or unexported fields

Engine is the default Redis storage engine

func NewRedisStore

func NewRedisStore(prefix string, pool pl, cleanupTimeout time.Duration) *Engine

NewRedisStore creates a new standard Redis-backed store

func (*Engine) Exists

func (e *Engine) Exists(key string) bool

Exists checks to see if a key exists in the store

func (*Engine) Expire

func (e *Engine) Expire(key string) error

Expire marks the key as expired, and removes it from the storage engine

func (*Engine) Get

func (e *Engine) Get(key string) (data []byte, err error)

Get retrieves data from the store based on key, if it exists, else it returns an error

func (*Engine) IsExpired

func (e *Engine) IsExpired(key string) bool

IsExpired checks to see if the key has expired

func (*Engine) IsLocked

func (e *Engine) IsLocked(key string) bool

IsLocked checks to see if the key has been locked

func (*Engine) Lock

func (e *Engine) Lock(key string) error

Lock sets a lock against the given key

func (*Engine) Put

func (e *Engine) Put(key string, data []byte, expires time.Time) error

Put stores data against a key, else it returns an error

func (*Engine) Unlock

func (e *Engine) Unlock(key string) error

Unlock removes the lock from a given key, if it doesn't exist it returns an error

Source Files

Jump to

Keyboard shortcuts

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