redis

package
v0.0.0-...-a27e3ed Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const TTL = "60"

TTL Time to live

Variables

View Source
var (
	// Pool redis
	Pool *redis.Pool
)

Functions

func Close

func Close()

Close Pool

func Delete

func Delete(key string) error

Delete a key

func Exists

func Exists(key string) (bool, error)

Exists a key

func Expire

func Expire(key string) (bool, error)

Expire a key

func Get

func Get(key string) ([]byte, error)

Get a value

func GetKeys

func GetKeys(pattern string) ([]string, error)

GetKeys all

func GetValues

func GetValues(key string) []string

GetValues from a set

func Incr

func Incr(counterKey string) (int, error)

Incr a counter

func Ping

func Ping()

Ping redis

func PushValue

func PushValue(list string, value string) error

PushValue into a set

func RemoveValue

func RemoveValue(list string, value string) error

RemoveValue from a set

func Set

func Set(key string, value []byte) error

Set a key

Types

This section is empty.

Jump to

Keyboard shortcuts

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