redis

package
v0.0.0-...-61829c1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChannelNamePrefix = "mq-channel-"

Functions

This section is empty.

Types

type RedisBackend

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

func NewRedisBackend

func NewRedisBackend(pool *redis.Pool, prefix string) *RedisBackend

func (*RedisBackend) Cancel

func (backend *RedisBackend) Cancel(id string) error

func (*RedisBackend) ClearCancellation

func (backend *RedisBackend) ClearCancellation(id string) error

func (*RedisBackend) FeedBack

func (backend *RedisBackend) FeedBack(taskStatus *mq.TaskStatus) error

func (*RedisBackend) GetFeedback

func (backend *RedisBackend) GetFeedback() (*mq.TaskStatus, error)

func (*RedisBackend) IsCancelled

func (backend *RedisBackend) IsCancelled(id string) (bool, error)

func (*RedisBackend) ListChannel

func (backend *RedisBackend) ListChannel() ([]string, error)

func (*RedisBackend) ListSubject

func (backend *RedisBackend) ListSubject(channel string) ([]string, error)

func (*RedisBackend) RegisterChannel

func (backend *RedisBackend) RegisterChannel(channel string, subjects []string) error

type RedisBroker

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

func NewRedisBroker

func NewRedisBroker(pool *redis.Pool, prefix string) *RedisBroker

func (*RedisBroker) GetTask

func (broker *RedisBroker) GetTask(channel string) (*mq.Task, error)

func (*RedisBroker) SendTask

func (broker *RedisBroker) SendTask(task *mq.Task) error

type RedisConn

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

func ConnRedis

func ConnRedis(pool *redis.Pool) *RedisConn

func (*RedisConn) Do

func (c *RedisConn) Do(cmd string, args ...interface{}) (interface{}, error)

func (*RedisConn) Exec

func (c *RedisConn) Exec() (interface{}, error)

func (*RedisConn) Send

func (c *RedisConn) Send(cmd string, args ...interface{})

Jump to

Keyboard shortcuts

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