mq

package
v0.0.0-...-07bc221 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 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 MessageQueue

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

func New

func New(c context.Context, redis *redis.Client, maxRetries int) MessageQueue

type MsgArgs

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

type QueueArgs

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

func (*QueueArgs) Publish

func (q *QueueArgs) Publish(topic string, msg string, delay int64) 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