queue

package
v0.0.0-...-185ad70 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AMQPLoadTasks

func AMQPLoadTasks(tasks []t.MIDATask) (int, error)

Takes an array of MIDATasks and loads them into a RabbitMQ queue Requires the RabbitMQ URI (along with valid credentials)

func DecodeAMQPMessageToRawTask

func DecodeAMQPMessageToRawTask(delivery amqp.Delivery) (t.MIDATask, error)

Takes an AMQP message (which is expected to be a MIDATask, in JSON format) and converts it into an actual MIDATask struct

Types

type Consumer

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

func NewAMQPBroadcastConsumer

func NewAMQPBroadcastConsumer() (*Consumer, <-chan amqp.Delivery, error)

func NewAMQPTasksConsumer

func NewAMQPTasksConsumer() (*Consumer, <-chan amqp.Delivery, error)

func (*Consumer) Shutdown

func (c *Consumer) Shutdown() error

Graceful shutdown of a connection to AMQP

Jump to

Keyboard shortcuts

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