rabbitmq_utils

package
v0.0.0-...-55179ed Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPublisherOptionsExchangeName

func WithPublisherOptionsExchangeName(exchangeName string) func(*Publisher) error

Types

type Conn

type Conn struct {
	Conn *amqp.Connection
}

func NewConn

func NewConn(amqpURL string, options ...func(*Conn) error) (*Conn, error)

func (*Conn) Close

func (brokerConn *Conn) Close() error

type PublishOptions

type PublishOptions struct {
	ContentType string
	Exchange    string
}

type Publisher

type Publisher struct {
	Channel *amqp.Channel
}

func NewPublisher

func NewPublisher(brokerConn *Conn, options ...func(*Publisher) error) (*Publisher, error)

func (*Publisher) Close

func (brokerChannel *Publisher) Close() error

func (*Publisher) Publish

func (brokerChannel *Publisher) Publish(
	body []byte,
	routingKey string,
	options ...func(*PublishOptions) error,
) error

Jump to

Keyboard shortcuts

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