Documentation ¶
Overview ¶
Module amqp implements an AMQP binding using pack.ag/amqp module
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReceiver ¶
Create a new Receiver which wraps an amqp.Receiver in a binding.Receiver
func NewSender ¶
func NewSender(amqpSender *amqp.Sender, options ...SenderOptionFunc) protocol.Sender
Create a new Sender which wraps an amqp.Sender in a binding.Sender
func WriteMessage ¶
func WriteMessage(ctx context.Context, m binding.Message, amqpMessage *amqp.Message, transformers ...binding.TransformerFactory) error
Fill the provided amqpMessage with the message m. Using context you can tweak the encoding processing (more details on binding.Write documentation).
Types ¶
type Message ¶
Message implements binding.Message by wrapping an *amqp.Message. This message *can* be read several times safely
func NewMessage ¶
Wrap an *amqp.Message in a binding.Message. The returned message *can* be read several times safely
func (*Message) ReadBinary ¶
func (*Message) ReadEncoding ¶
func (*Message) ReadStructured ¶
type Option ¶
Option is the function signature required to be considered an amqp.Option.
func WithConnOpt ¶
func WithConnOpt(opt amqp.ConnOption) Option
WithConnOpt sets a connection option for amqp
func WithConnSASLPlain ¶
WithConnSASLPlain sets SASLPlain connection option for amqp
func WithReceiverLinkOption ¶
func WithReceiverLinkOption(opt amqp.LinkOption) Option
WithReceiverLinkOption sets a link option for amqp
func WithSenderLinkOption ¶
func WithSenderLinkOption(opt amqp.LinkOption) Option
WithSenderLinkOption sets a link option for amqp
func WithSessionOpt ¶
func WithSessionOpt(opt amqp.SessionOption) Option
WithSessionOpt sets a session option for amqp
type Protocol ¶
type Protocol struct { // AMQP Client *amqp.Client Session *amqp.Session Node string // Sender Sender protocol.Sender SenderContextDecorators []func(context.Context) context.Context // Receiver Receiver protocol.Receiver // contains filtered or unexported fields }
func (*Protocol) HasTracePropagation ¶
HasTracePropagation implements Protocol.HasTracePropagation
func (*Protocol) OpenInbound ¶
StartReceiver implements Protocol.StartReceiver NOTE: This is a blocking call.
type SenderOptionFunc ¶
type SenderOptionFunc func(sender *sender)
amqp.Sender options
func WithTransformer ¶
func WithTransformer(transformer binding.TransformerFactory) SenderOptionFunc
Add a transformer, which Sender uses while encoding a binding.Message to an amqp.Message