redis

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(messageQueue *MessageQueue)

Types

type MessageQueue

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

func New

func New(address string, userName string, password string, db int, opts ...Option) *MessageQueue

func (*MessageQueue) Publish

func (messageQueue *MessageQueue) Publish(topic string, event *data_protocol.CloudEvent) error

func (*MessageQueue) Subscribe

func (messageQueue *MessageQueue) Subscribe(group string, topic string, handler common.MessageHandler) error

func (*MessageQueue) UnSubscribe

func (messageQueue *MessageQueue) UnSubscribe(group string, topic string) error

type Option added in v1.1.10

type Option func(options *Options)

func WithConsumerNum added in v1.1.10

func WithConsumerNum(consumerNum int) Option

func WithMaxLen added in v1.1.10

func WithMaxLen(maxLen int64) Option

type Options added in v1.1.10

type Options struct {
	MaxLen      int64
	ConsumerNum int
}

Jump to

Keyboard shortcuts

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