mq

package
v0.0.0-...-7e594e5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueue

type MessageQueue interface {
	Publish(topic string, msg string) error
	Subscribe(topic string, processes int, handler func(msg string))
}

func New

func New(redis *redis.Pool, maxRetries int) MessageQueue

type MsgArgs

type MsgArgs struct {
	Msg   string `json:"msg"`
	Retry int    `json:"retry"`
}

type QueueArgs

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

func (*QueueArgs) Publish

func (q *QueueArgs) Publish(topic string, msg string) error

func (*QueueArgs) Subscribe

func (q *QueueArgs) Subscribe(topic string, processes int, handler func(data string))

Jump to

Keyboard shortcuts

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