Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Connect() error
Disconnect() error
Publish(string, *Message, ...PublishOption) error
Subscribe(string, ...SubscribeOption) (Subscription, error)
}
Client is a client interface for various message brokers, e.g., RabbitMQ, Kafka, NATS, etc.
type Publication ¶
Publication is given to a subscriber for processing
type PublishOption ¶
type PublishOption func(*PublishOptions)
type PublishOptions ¶
type PublishOptions struct {
}
type SubscribeOption ¶
type SubscribeOption func(*SubscribeOptions)
func AutoAck ¶
func AutoAck(enabled bool) SubscribeOption
AutoAck will enable/disable auto acking of messages after they have been handled.
func Queue ¶
func Queue(name string) SubscribeOption
Queue sets the name of the queue to share messages on
type SubscribeOptions ¶
type Subscription ¶
type Subscription interface {
Topic() string
Chan() <-chan Publication
Unsubscribe() error
}
Subscriber is a convenience return type for the Subscribe method
Click to show internal directories.
Click to hide internal directories.