workers

package
v0.0.0-...-8341997 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseWorker

type BaseWorker struct {
	RB gateways.RabbitI
	HandleFunc
}

func (*BaseWorker) Consume

func (w *BaseWorker) Consume() error

Consume starts a channel that consumes messages from the front of the queue

type HandleFunc

type HandleFunc func([]byte)

func (HandleFunc) Handle

func (f HandleFunc) Handle(body []byte)

type Worker

type Worker interface {
	Consume() error
	Handle([]byte)
}

Worker describes the functions a queue worker uses

func NewSend

func NewSend(ctx *handlers.GatewayContext) Worker

NewSend creates and returns a new SendWorker

Jump to

Keyboard shortcuts

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