redis

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnPoolPing

func ConnPoolPing(redPool *redis.Pool) error

ConnPoolPing allows a check on redis server status

func Consume added in v1.0.3

func Consume(rp *redis.Pool, key string) error

Consume will check if a key exists and if it exists, will destroy it

func Exists added in v1.0.4

func Exists(rp *redis.Pool, key string) (bool, error)

Exists return true if key is present

func NewConnPool

func NewConnPool(redisConf Config) (*redis.Pool, error)

NewConnPool connects to redis and return a connection pool

func SetKeyWithExpiration added in v1.0.3

func SetKeyWithExpiration(rp *redis.Pool, key string, exp int64) error

SetKeyWithExpiration will simply set a key that will expire after exp millisecond

Types

type Config

type Config struct {
	Host                 string
	Port                 string
	Password             string
	MaxActiveConnections int
}

Config is a conf for the redis KV store

Jump to

Keyboard shortcuts

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