redisBroker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideKey

func HideKey(key string) string

Types

type RedisBroker

type RedisBroker struct {
	// contains filtered or unexported fields
}

func NewRedisBroker

func NewRedisBroker(host string, port string, password string, db int, numConns int) RedisBroker

func (RedisBroker) Get

func (r RedisBroker) Get(queryName string) (ymsg.Message, error)

func (RedisBroker) Send

func (r RedisBroker) Send(queryName string, msg ymsg.Message) error

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

func NewRedisClient

func NewRedisClient(host string, port string, password string, db int, numConns int) RedisClient

func (*RedisClient) BLPop

func (c *RedisClient) BLPop(key string, timeout time.Duration) (interface{}, error)

func (*RedisClient) BRPop

func (c *RedisClient) BRPop(key string, timeout time.Duration) (interface{}, error)

func (*RedisClient) Close

func (c *RedisClient) Close()

func (*RedisClient) Del

func (c *RedisClient) Del(key string) error

func (*RedisClient) Do

func (c *RedisClient) Do(commandName string, args ...interface{}) (interface{}, error)

======================= lower api =======================

func (*RedisClient) Exists

func (c *RedisClient) Exists(key string) (bool, error)

======================= high api =======================

func (*RedisClient) Expire

func (c *RedisClient) Expire(key string, t time.Duration) error

func (*RedisClient) Flush

func (c *RedisClient) Flush() error

func (*RedisClient) Get

func (c *RedisClient) Get(key string) (interface{}, error)

func (*RedisClient) LPop

func (c *RedisClient) LPop(key string) (interface{}, error)

func (*RedisClient) LPush

func (c *RedisClient) LPush(key string, value interface{}) (interface{}, error)

func (*RedisClient) Ping

func (c *RedisClient) Ping() error

func (*RedisClient) RPush

func (c *RedisClient) RPush(key string, value interface{}) (interface{}, error)

func (*RedisClient) Receive

func (c *RedisClient) Receive() (interface{}, error)

func (*RedisClient) Send

func (c *RedisClient) Send(commandName string, args ...interface{}) error

func (*RedisClient) Set

func (c *RedisClient) Set(key string, value interface{}, exTime time.Duration) (interface{}, error)

Jump to

Keyboard shortcuts

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