queue

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeliveryMode

type DeliveryMode uint8
const (
	Transient DeliveryMode = 1 + iota
	Persistent
)

type Options

type Options struct {
	URL             string
	ConnectAttempts int
	Exchange        struct {
		Name    string
		Type    string
		Durable bool
	}
}

type Publishing

type Publishing interface {
	GetBody() ([]byte, error)
	GetHeaders() amqp.Table
	SetHeaders(map[string]any)
	GetDeliveryMode() DeliveryMode
	GetRoutingKey() string
}

type RabbitMQ

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

func NewRabbitMQ

func NewRabbitMQ(options *Options) *RabbitMQ

func (*RabbitMQ) Close

func (q *RabbitMQ) Close()

Close closes the RabbitMQ connection and channel.

func (*RabbitMQ) GetChannel

func (q *RabbitMQ) GetChannel() *amqp.Channel

func (*RabbitMQ) GetExchangeName

func (q *RabbitMQ) GetExchangeName() string

func (*RabbitMQ) GetStatus

func (q *RabbitMQ) GetStatus() bool

func (*RabbitMQ) Init

func (q *RabbitMQ) Init() error

func (*RabbitMQ) Publish

func (q *RabbitMQ) Publish(message Publishing) error

Jump to

Keyboard shortcuts

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