amqp091go

package
v0.0.0-...-c1a9e9f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(serverURL string, bindings *runAmqp.ServerBindings) (*Client, error)

func (Client) Publisher

func (c Client) Publisher(_ context.Context, _ string, bindings *runAmqp.ChannelBindings) (runAmqp.Publisher, error)

func (Client) Subscriber

func (c Client) Subscriber(_ context.Context, channelName string, bindings *runAmqp.ChannelBindings) (runAmqp.Subscriber, error)

type EnvelopeIn

type EnvelopeIn struct {
	*amqp091.Delivery
	// contains filtered or unexported fields
}

func NewEnvelopeIn

func NewEnvelopeIn(delivery *amqp091.Delivery, rd io.Reader) *EnvelopeIn

func (EnvelopeIn) Ack

func (e EnvelopeIn) Ack() error

func (EnvelopeIn) Headers

func (e EnvelopeIn) Headers() run.Headers

func (EnvelopeIn) Nack

func (e EnvelopeIn) Nack(requeue bool) error

func (EnvelopeIn) Read

func (e EnvelopeIn) Read(p []byte) (n int, err error)

type EnvelopeOut

type EnvelopeOut struct {
	*amqp091.Publishing
	// contains filtered or unexported fields
}

func NewEnvelopeOut

func NewEnvelopeOut() *EnvelopeOut

func (*EnvelopeOut) AsAMQP091Record

func (e *EnvelopeOut) AsAMQP091Record() *amqp091.Publishing

func (*EnvelopeOut) ResetPayload

func (e *EnvelopeOut) ResetPayload()

func (*EnvelopeOut) RoutingKey

func (e *EnvelopeOut) RoutingKey() string

func (*EnvelopeOut) SetBindings

func (e *EnvelopeOut) SetBindings(bindings runAmqp.MessageBindings)

func (*EnvelopeOut) SetContentType

func (e *EnvelopeOut) SetContentType(contentType string)

func (*EnvelopeOut) SetHeaders

func (e *EnvelopeOut) SetHeaders(headers run.Headers)

func (*EnvelopeOut) SetRoutingKey

func (e *EnvelopeOut) SetRoutingKey(routingKey string)

func (*EnvelopeOut) Write

func (e *EnvelopeOut) Write(p []byte) (n int, err error)

type ImplementationRecord

type ImplementationRecord interface {
	AsAMQP091Record() *amqp091.Publishing
	RoutingKey() string
}

type PublishChannel

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

func (PublishChannel) Send

func (p PublishChannel) Send(ctx context.Context, envelopes ...runAmqp.EnvelopeWriter) error

type SubscribeChannel

type SubscribeChannel struct {
	*amqp091.Channel
	// ConsumerTag uniquely identifies the consumer process. If empty, a unique tag is generated.
	ConsumerTag string
	// Additional arguments for the consumer. See ConsumeWithContext docs for details.
	ConsumeArgs amqp091.Table
	// contains filtered or unexported fields
}

func (SubscribeChannel) Receive

func (s SubscribeChannel) Receive(ctx context.Context, cb func(envelope runAmqp.EnvelopeReader)) (err error)

Jump to

Keyboard shortcuts

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