worker

package
v0.0.0-...-7c53e23 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dispatch Dispatch
	Consumer Consumer
	MaxJobs  uint
}

type Consumer

type Consumer interface {
	Start() error
	Stop()
	Events() chan *gmunch.Event
}

type Dispatch

type Dispatch map[string]DispatchFunc

type DispatchFunc

type DispatchFunc func(*gmunch.Event) []Task

type Task

type Task interface {
	scheduler.Task
}

type Worker

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

func New

func New(config Config) *Worker

func (*Worker) DispatchEvent

func (w *Worker) DispatchEvent(event *gmunch.Event) error

func (*Worker) Start

func (w *Worker) Start() error

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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