mainmq

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RabbitMq

type RabbitMq struct {
	// contains filtered or unexported fields
}

func NewRabbitMqQueue

func NewRabbitMqQueue(url string) (*RabbitMq, error)

func (*RabbitMq) BindQueue added in v0.0.8

func (r *RabbitMq) BindQueue(ctx context.Context, qName, routingKey, exchange string, durable bool) error

func (*RabbitMq) Close

func (r *RabbitMq) Close(ctx context.Context)

func (*RabbitMq) ConsumeTasksFromQueue

func (r *RabbitMq) ConsumeTasksFromQueue(ctx context.Context, qName, consumer string, autoAck bool, task func(ctx context.Context, event *models.Event) error) error

func (*RabbitMq) DeclareExchange added in v0.0.8

func (r *RabbitMq) DeclareExchange(ctx context.Context, name, kind string, durable bool) error

func (*RabbitMq) DeclareQueue

func (r *RabbitMq) DeclareQueue(ctx context.Context, qName string, durable bool) error

func (*RabbitMq) SendTaskToQueue

func (r *RabbitMq) SendTaskToQueue(ctx context.Context, exchange, routingKey string, event *models.Event) error

func (*RabbitMq) SetQos

func (r *RabbitMq) SetQos(ctx context.Context, prefetchCount, prefetchSize int, global bool) error

Jump to

Keyboard shortcuts

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