queue

package
v0.0.0-...-1f3bb9f Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue interface {
	Create(q *QueueInfo) error
	Connect(q *QueueInfo) error
	Add(q *QueueInfo, request *request.Request) error
	InfoFromConfig(q *QueueInfo) error // populate QueueInfo with config
}

Queue is an abstract interface that defines operations required for any supported queueing system

func NewFileSystemQueue

func NewFileSystemQueue(qi *QueueInfo) Queue

func NewGCTQueue

func NewGCTQueue(qi *QueueInfo) Queue

func NewNullQueue

func NewNullQueue(qi *QueueInfo) Queue

type QueueInfo

type QueueInfo struct {
	Name            string // Name of queue
	ServiceToHandle string // Name of service to receive this request
	HandlerEndpoint string // Endpoint to receive this request
}

QueueInfo identifies key properties of a queue

type QueueService

type QueueService interface {
	CreateQueue(q *QueueInfo) error
	ConnectToQueue(q *QueueInfo) error
	AddToQueue(q *QueueInfo, request *request.Request) error
}

QueueService defines the business logic to interact with a queue, most of which pass through to the underlying adapter

func NewService

func NewService(q Queue) QueueService

Jump to

Keyboard shortcuts

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