Documentation ¶
Overview ¶
Package amqp provides a client with included tracing capabilities.
Deprecated: The AMQP client package is superseded by the `github.com/beatlabs/client/amqp/v2` package. Please refer to the documents and the examples for the usage.
This package is frozen and no new functionality will be added.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message abstraction for publishing.
func NewJSONMessage ¶
NewJSONMessage creates a new message with a JSON encoded body.
func NewMessage ¶
NewMessage creates a new message.
func NewProtobufMessage ¶
NewProtobufMessage creates a new message with a protobuf encoded body.
type OptionFunc ¶
type OptionFunc func(*TracedPublisher) error
OptionFunc definition for configuring the publisher in a functional way.
func Timeout ¶
func Timeout(timeout time.Duration) OptionFunc
Timeout option for adjusting the timeout of the connection.
type Publisher ¶
type Publisher interface { Publish(ctx context.Context, msg *Message) error Close(ctx context.Context) error }
Publisher interface of a RabbitMQ publisher.
type TracedPublisher ¶
type TracedPublisher struct {
// contains filtered or unexported fields
}
TracedPublisher defines a RabbitMQ publisher with tracing instrumentation.
func NewPublisher
deprecated
func NewPublisher(url, exc string, oo ...OptionFunc) (*TracedPublisher, error)
NewPublisher creates a new publisher with the following defaults - exchange type: fanout - notifications are not handled at this point TBD.
Deprecated: The AMQP client package is superseded by the `github.com/beatlabs/client/amqp/v2` package. Please refer to the documents and the examples for the usage.
This package is frozen and no new functionality will be added.