queue

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

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

PubSub implements a RabbitMQ publisher and receiver

func NewPubSub

func NewPubSub(exchange string) *PubSub

NewPubSub creates a PubSub instance

func (*PubSub) Bind

func (p *PubSub) Bind(dsn string) error

Bind to a amqp dsn.

func (*PubSub) Close

func (p *PubSub) Close()

Close connection and channels.

func (*PubSub) Consume

func (p *PubSub) Consume() error

Consume messages and put the on msgs channel for later dispatching

func (*PubSub) Dispatch

func (p *PubSub) Dispatch()

Dispatch incoming messages

func (*PubSub) ExchangeDeclare

func (p *PubSub) ExchangeDeclare() error

ExchangeDeclare used for global message subbing

func (*PubSub) Init

func (p *PubSub) Init(dsn string) error

Init pubsub connection

func (*PubSub) Publish

func (p *PubSub) Publish(ctx context.Context, uri string, action string) error

Publish a message to the exchange

func (*PubSub) PublishWithKey

func (p *PubSub) PublishWithKey(ctx context.Context, uri string, action string, key string) error

PublishWithKey a message to the exchange with a non-default key (ie. not annotation.<action>)

func (*PubSub) QueueBind

func (p *PubSub) QueueBind(queues []string) error

QueueBind to the queue we want to ingest

func (*PubSub) QueueBindObservedQueues

func (p *PubSub) QueueBindObservedQueues() error

QueueBindObservedQueues ...

func (*PubSub) QueueDeclare

func (p *PubSub) QueueDeclare() error

QueueDeclare used for global messages subbing

func (*PubSub) RegisterObserver

func (p *PubSub) RegisterObserver(key string, observer annotator.Annotator)

RegisterObserver ...

Jump to

Keyboard shortcuts

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