job

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 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 ChainHandler

type ChainHandler interface {
	Handler
	Chainer
}

ChainHandler — a Handler that can be chained to a "next" handler to create a chain of Handlers.

type Chainer

type Chainer interface {
	SetNext(Handler)
}

A Chainer can accept a Handler as its next Handler to create a chain of Handlers.

type Handler

type Handler interface {
	Handle(*Request)
}

A Handler responds to a Request.

type Notifier

type Notifier interface {
	Notify() error
	NotifySchedules() error
}

Notifier — notifies about the progress/status of a running job.

type Poller

type Poller interface {
	Poll() *Request
}

A Poller polls its source(s) for the available job.

type Request

type Request struct {
	event.JobQueued
	*event.JobUpdated

	*event.Schedules
	// contains filtered or unexported fields
}

func New

func New(exchange, queue string, pub pubsub.Publisher, sub pubsub.Subscriber) *Request

func (*Request) Fail

func (r *Request) Fail(err error) error

func (*Request) Notify

func (r *Request) Notify() error

func (*Request) NotifySchedules

func (r *Request) NotifySchedules() error

func (*Request) Poll

func (r *Request) Poll() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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