redis

package
v0.0.0-...-868a888 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyExisted = 1
)

Variables

This section is empty.

Functions

func Delete

func Delete(key string) error

Delete delete from redis

func Do

func Do(args ...interface{}) (interface{}, error)

Do

func Exists

func Exists(key string) (bool, error)

Exists exist in redis

func Get

func Get(key string) (string, error)

Get get value from redis

func Init

func Init(addr, pass string, db int) error

Init initialize redis client

func Keys

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

Keys

func Publish

func Publish(channel string, message interface{}) error

Publish publish to channel

func Rdb

func Rdb() *redis.Client

func Scan

func Scan(cursor uint64, match string, count int64) ([]string, uint64, error)

Scan

func Set

func Set(key string, value interface{}, expiration time.Duration) error

Set set value to redis

func Subscribe

func Subscribe(channel string) *redis.PubSub

Subscribe subscribe a channel

func SubscribeChan

func SubscribeChan(channel string) <-chan *redis.Message

SubscribeChan subscribe a channel,return <- chan

Types

This section is empty.

Jump to

Keyboard shortcuts

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