redisc

package
v4.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisConnPool *redis.Pool

Functions

func CloseRedis

func CloseRedis()

func DelKey

func DelKey(key string) error

func GET

func GET(key string) int64

func HDEL

func HDEL(keys []interface{}) (int64, error)

func HKEYS

func HKEYS(key string) ([]string, error)

func HSET

func HSET(key string, field interface{}, value interface{}) (int64, error)

func HasKey

func HasKey(key string) bool

func INCR

func INCR(key string) int

func InitRedis

func InitRedis(r RedisSection)

func PingRedis

func PingRedis(c redis.Conn, t time.Time) error

func Pop

func Pop(count int, queue string) []*dataobj.Message

func PopEvent added in v4.0.4

func PopEvent(count int, queues []interface{}) []*models.Event

func Push

func Push(event *dataobj.Event) error

func Set

func Set(key string, value interface{}) error

func SetWithTTL

func SetWithTTL(key string, value interface{}, ttl int) error

func Write

func Write(data *dataobj.Message, queue string) error

Write LPUSH message to redis

Types

type RedisSection

type RedisSection struct {
	Local localRedis `yaml:"local"`
}

Jump to

Keyboard shortcuts

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