broker

package
v0.0.0-...-54d3f5c Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageBroker

type MessageBroker interface {
	PublishToQueue(ctx context.Context, queue string, body []byte) error
	PublishToTopic(ctx context.Context, topic string, body []byte) error
	Close() error
}

type RabbitMQPublisher

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

func NewPublisher

func NewPublisher(url string, log *slog.Logger, exchangeName, queueName string) (*RabbitMQPublisher, error)

func (*RabbitMQPublisher) Close

func (r *RabbitMQPublisher) Close() error

func (*RabbitMQPublisher) PublishToQueue

func (r *RabbitMQPublisher) PublishToQueue(ctx context.Context, queue string, body []byte) error

func (*RabbitMQPublisher) PublishToTopic

func (r *RabbitMQPublisher) PublishToTopic(ctx context.Context, topic string, body []byte) error

Jump to

Keyboard shortcuts

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