rmqbuilder

package
v0.0.0-...-d1e270b Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Channel *amqp.Channel
}

Builder defines the builder function

func (*Builder) BuildMessageHeaders

func (b *Builder) BuildMessageHeaders(rawHeaders map[string]interface{}) (*amqp.Table, error)

BuildMessageHeaders builds message headers for rabbitMQ

func (*Builder) BuildRMQMessage

func (b *Builder) BuildRMQMessage(rmqRoute string, priority uint8, data interface{}) (*Message, error)

BuildRMQMessage builds a message for rabbitMQ

func (*Builder) BuildStringBody

func (b *Builder) BuildStringBody(body string) (*[]byte, error)

BuildStringBody builds string-typed body

type Message

type Message struct {
	RoutingKey string
	Priority   uint8
	Body       MessageBody
}

Message is the amqp request to publish

type MessageBody

type MessageBody struct {
	Data []byte
}

MessageBody is the struct for the body passed in the AMQP message. The type will be set on the Request header

Jump to

Keyboard shortcuts

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