amqp

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("amqp", fx.Provide(NewAMQPConnection))

Functions

This section is empty.

Types

type Channel added in v0.2.0

type Channel struct {
	*amqp.Channel
	// contains filtered or unexported fields
}

func (*Channel) Close added in v0.2.0

func (ch *Channel) Close() error

Close ensure closed flag set

func (*Channel) Consume added in v0.2.0

func (ch *Channel) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)

Consume wrap amqp.Channel.Consume, the returned delivery will end only when channel closed by developer

func (*Channel) IsClosed added in v0.2.0

func (ch *Channel) IsClosed() bool

IsClosed indicate closed by developer

type Configuration

type Configuration struct {
	Address      string
	ConsumerName string
	TLS          bool
	Username     string
	Password     string
}

func (Configuration) Dsn

func (config Configuration) Dsn() string

type Connection added in v0.2.0

type Connection struct {
	Amqp *amqp.Connection
	Log  *zap.Logger
	// contains filtered or unexported fields
}

func NewAMQPConnection

func NewAMQPConnection(config Configuration, l *zap.Logger) (*Connection, error)

func (*Connection) Channel added in v0.2.0

func (a *Connection) Channel() (*Channel, error)

func (*Connection) Reconnect added in v0.2.0

func (a *Connection) Reconnect() error

Jump to

Keyboard shortcuts

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