amqpx

package
v0.0.0-...-279ef49 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

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

func (*Channel) CancelConsumer

func (c *Channel) CancelConsumer(consumerTag string, noWait bool) error

func (*Channel) Close

func (c *Channel) Close() error

func (*Channel) Consume

func (c *Channel) Consume(queue, consumerTag string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table, consumer Consumer) error

func (*Channel) ExchangeDeclare

func (c *Channel) ExchangeDeclare(name string, kind string, durable bool, autoDelete bool, internal bool, args amqp.Table) error

func (*Channel) ExchangeDeclareNoWait

func (c *Channel) ExchangeDeclareNoWait(name string, kind string, durable bool, autoDelete bool, internal bool, args amqp.Table) error

func (*Channel) Publish

func (c *Channel) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error

func (*Channel) PublishWithContext

func (c *Channel) PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error

func (*Channel) Qos

func (c *Channel) Qos(prefetchCount, prefetchSize int, global bool) error

func (*Channel) QueueBind

func (c *Channel) QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error

func (*Channel) QueueDeclare

func (c *Channel) QueueDeclare(name string, durable bool, autoDelete bool, exclusive bool, args amqp.Table) (amqp.Queue, error)

func (*Channel) QueueDeclareNoWait

func (c *Channel) QueueDeclareNoWait(name string, durable bool, autoDelete bool, exclusive bool, args amqp.Table) (amqp.Queue, error)

type Connection

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

func Dial

func Dial(url string) (*Connection, error)

func (*Connection) Channel

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

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) IsClosed

func (c *Connection) IsClosed() bool

func (*Connection) SetLogger

func (c *Connection) SetLogger(logger *slog.Logger)

type Consumer

type Consumer interface {
	HandleDelivery(delivery amqp.Delivery)
}

type RecordedBinding

type RecordedBinding struct {
	QueueName    string
	ExchangeName string
	RoutingKey   string
	Args         amqp.Table
}

func (*RecordedBinding) Equal

func (rb *RecordedBinding) Equal(another *RecordedBinding) bool

type RecordedConsumer

type RecordedConsumer struct {
	QueueName   string
	ConsumerTag string
	AutoAck     bool
	Exclusive   bool
	NoWait      bool
	Args        amqp.Table
	Consumer    Consumer
}

type RecordedExchange

type RecordedExchange struct {
	Kind       string
	Durable    bool
	AutoDelete bool
	Args       amqp.Table
}

type RecordedQueue

type RecordedQueue struct {
	Durable    bool
	AutoDelete bool
	Exclusive  bool
	Args       amqp.Table
}

Jump to

Keyboard shortcuts

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