redis

package
v0.0.0-...-e6b553b Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: MIT 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 {
	Client *r.Client
	PubSub *r.PubSub
}

Redis struct

func InitRedis

func InitRedis(port string) (*Redis, error)

InitRedis initializes redis client.

func (*Redis) DelKey

func (r *Redis) DelKey(key string) error

DelKey deletes the key from redis.

func (*Redis) InitPubSubChannel

func (r *Redis) InitPubSubChannel()

InitPubSubChannel initializes the Pub/Sub Channel

func (*Redis) KeyExists

func (r *Redis) KeyExists(key string) bool

KeyExists checks if key exists in Redis

func (*Redis) Publish

func (r *Redis) Publish(msg string) error

Publish sends the value to the pub/sub channel

func (*Redis) SetKey

func (r *Redis) SetKey(key, value string)

SetKey sets the key value pair into redis

Jump to

Keyboard shortcuts

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