mq

package
v0.0.0-...-192b259 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerHandler

type ConsumerHandler interface {
	OnMessage(msg string, ctx context.Context)
}

type MessageQueueHandler

type MessageQueueHandler interface {
	Publish(channel string, msg string, ctx context.Context) error
	Subscribe(channel string, consumer ConsumerHandler) error
}

type RedisQueueHandler

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

func BuildFactory

func BuildFactory(arg interface{}) (*RedisQueueHandler, error)

func (*RedisQueueHandler) Publish

func (r *RedisQueueHandler) Publish(channel string, msg string, ctx context.Context) error

func (*RedisQueueHandler) Subscribe

func (r *RedisQueueHandler) Subscribe(channel string, consumer ConsumerHandler) error

Jump to

Keyboard shortcuts

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