redis

package
v0.0.0-...-d78814b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.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 Redis

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

Redis is a cache backend.

func New

func New(address string, db int, prefix string) (*Redis, error)

New Redis backend.

func (*Redis) Delete

func (r *Redis) Delete(key ...string)

Delete keys from Redis.

func (*Redis) Get

func (r *Redis) Get(key string) ([]byte, error)

Get a key from Redis.

func (*Redis) Keys

func (r *Redis) Keys(pattern string) ([]string, error)

Keys returns a list of Redis keys matching a pattern.

func (*Redis) Lock

func (r *Redis) Lock(key, value string, expires int) bool

Lock a mutex.

func (*Redis) Set

func (r *Redis) Set(key string, v []byte, expires int) error

Set a key in Redis.

func (*Redis) Unlock

func (r *Redis) Unlock(key string)

Unlock a mutex.

Jump to

Keyboard shortcuts

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