rabbitmq

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectRabbitMQ

func ConnectRabbitMQ() *amqp.Connection

func PublishToQueue

func PublishToQueue(conn *amqp.Connection, queueName string, msg Msg) error

func ReceiveFromQueue

func ReceiveFromQueue(conn *amqp.Connection, queueName string) (<-chan Msg, error)

Types

type Msg

type Msg struct {
	Verb    VerbType `bson:"verb" json:"verb"`
	JobName string   `bson:"job_name" json:"job_name"`
}

type VerbType

type VerbType string
const (
	VerbCreate    VerbType = "create"
	VerbConfigure VerbType = "configure"
	VerbDelete    VerbType = "delete"
)

Jump to

Keyboard shortcuts

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