mq

package
v0.0.0-...-716047f Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQ

type MQ interface {
	Publish(ctx context.Context, topic string, data []byte) error
	Consume(ctx context.Context, topic string) ([]byte, error)
}

MQ is interface of message queue

type RedisMQ

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

RedisMQ is Redis implementation of message queue

func NewRedisMQ

func NewRedisMQ(pool *memdb.Pool) *RedisMQ

func (*RedisMQ) Consume

func (mq *RedisMQ) Consume(ctx context.Context, topic string) ([]byte, error)

func (*RedisMQ) Publish

func (mq *RedisMQ) Publish(ctx context.Context, topic string, data []byte) error

Jump to

Keyboard shortcuts

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