rabbitmq

package module
v0.124.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmqpClient

type AmqpClient interface {
	DialConfig(config DialConfig) (Connection, error)
}

func NewAmqpClient

func NewAmqpClient(logger *zap.Logger) AmqpClient

type Channel

type Channel interface {
	Confirm(noWait bool) error
	PublishWithDeferredConfirmWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) (DeferredConfirmation, error)
	IsClosed() bool
	Close() error
}

type Connection

type Connection interface {
	ReconnectIfUnhealthy() error
	IsClosed() bool
	Channel() (Channel, error)
	NotifyClose(receiver chan *amqp.Error) chan *amqp.Error
	Close() error
}

type DeferredConfirmation

type DeferredConfirmation interface {
	Done() <-chan struct{}
	Acked() bool
}

type DialConfig

type DialConfig struct {
	URL               string
	Vhost             string
	Auth              amqp.Authentication
	ConnectionTimeout time.Duration
	Heartbeat         time.Duration
	TLS               *tls.Config
	ConnectionName    string
}

Jump to

Keyboard shortcuts

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