Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel interface {
PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
}
Channel is a RabbitMQ channel for publishing.
type ChannelFunc ¶
type ChannelFunc func(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
ChannelFunc type is an adapter to allow the use of ordinary functions as Channel.
func (ChannelFunc) PublishWithContext ¶
func (f ChannelFunc) PublishWithContext(ctx context.Context, exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
PublishWithContext implements Channel.
type Middleware ¶
Middleware adds new functionality for publishing.
func WithExpiration ¶
func WithExpiration(expire time.Duration) Middleware
WithExpiration sets publishing Expire property.
func WithHeaders ¶
func WithHeaders(table amqp.Table) Middleware
WithHeaders adds headers to the published message.
Click to show internal directories.
Click to hide internal directories.