broker

package
v1.2.1-0...-a02ee64 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CronJob

func CronJob(client redis.UniversalClient, broker Broker, message Message) ([]byte, error)

func DelayJob

func DelayJob(client redis.UniversalClient, broker Broker, message Message) ([]byte, error)

func DeleteJob

func DeleteJob(client redis.UniversalClient, broker Broker, message Message) ([]byte, error)

func GetJob

func GetJob(client redis.UniversalClient, broker Broker, message Message) ([]byte, error)

func HandleReceive

func HandleReceive(redis redis.UniversalClient, broker Broker)

func ReplyBack

func ReplyBack(broker Broker, delivery amqp091.Delivery, value []byte)

Types

type Broker

type Broker struct {
	Connection *amqp091.Connection
	Channel    *amqp091.Channel
	// contains filtered or unexported fields
}

func CreateBroker

func CreateBroker(amqpURI string) *Broker

type Message

type Message struct {
	T string `json:"t"`
	D struct {
		Time  interface{} `json:"time"`
		Data  interface{} `json:"data"`
		Name  *string     `json:"name"`
		Route *string     `json:"route"`
	} `json:"d"`
}

Jump to

Keyboard shortcuts

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