Documentation
¶
Index ¶
- type Options
- type RMQJob
- type RabbitMQBroker
- func (r *RabbitMQBroker) Ack(ctx context.Context, j job.Job) error
- func (r *RabbitMQBroker) Capabilities() core.BrokerCapabilities
- func (r *RabbitMQBroker) Close() error
- func (r *RabbitMQBroker) Connect(ctx context.Context) error
- func (r *RabbitMQBroker) CreateQueue(ctx context.Context, name string, options core.QueueOptions) error
- func (r *RabbitMQBroker) DeleteQueue(ctx context.Context, name string) error
- func (r *RabbitMQBroker) Dequeue(ctx context.Context, queue string) (job.Job, error)
- func (r *RabbitMQBroker) Enqueue(ctx context.Context, j job.Job) error
- func (r *RabbitMQBroker) Health() error
- func (r *RabbitMQBroker) Nack(ctx context.Context, j job.Job, requeue bool) error
- func (r *RabbitMQBroker) QueueExists(ctx context.Context, name string) (bool, error)
- func (r *RabbitMQBroker) QueueLength(ctx context.Context, name string) (int64, error)
- func (r *RabbitMQBroker) SetLogger(logger seelog.LoggerInterface)
- func (r *RabbitMQBroker) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQBroker ¶
type RabbitMQBroker struct {
// contains filtered or unexported fields
}
RabbitMQBroker implements the Broker interface for RabbitMQ
func NewBroker ¶
func NewBroker(options Options, serializer core.Serializer) *RabbitMQBroker
NewBroker creates a new RabbitMQ broker
func (*RabbitMQBroker) Capabilities ¶
func (r *RabbitMQBroker) Capabilities() core.BrokerCapabilities
Capabilities returns RabbitMQ broker capabilities
func (*RabbitMQBroker) Close ¶
func (r *RabbitMQBroker) Close() error
Close closes the RabbitMQ connection
func (*RabbitMQBroker) Connect ¶
func (r *RabbitMQBroker) Connect(ctx context.Context) error
Connect establishes connection to RabbitMQ
func (*RabbitMQBroker) CreateQueue ¶
func (r *RabbitMQBroker) CreateQueue(ctx context.Context, name string, options core.QueueOptions) error
CreateQueue creates a new queue
func (*RabbitMQBroker) DeleteQueue ¶
func (r *RabbitMQBroker) DeleteQueue(ctx context.Context, name string) error
DeleteQueue deletes a queue
func (*RabbitMQBroker) Health ¶
func (r *RabbitMQBroker) Health() error
Health checks the RabbitMQ connection health COMMENT: Not doing a PING here unlike Redis, is this enough. Do we need to open/close a channel to confirm?
func (*RabbitMQBroker) QueueExists ¶
QueueExists checks if a queue exists
func (*RabbitMQBroker) QueueLength ¶
QueueLength returns the number of jobs in a queue
func (*RabbitMQBroker) SetLogger ¶
func (r *RabbitMQBroker) SetLogger(logger seelog.LoggerInterface)
SetLogger sets the logger for the broker
Click to show internal directories.
Click to hide internal directories.