worker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do added in v0.0.2

func Do(c context.Context, w *Work)

Do retrieves a worker from the session and uses it to get work done.

func NewContext

func NewContext(parent context.Context, worker Worker) context.Context

NewContext returns a Context whose Value method returns the application's worker queue.

Types

type Assignment added in v0.0.2

type Assignment struct {
	Work   *Work
	Worker Worker
}

type Work added in v0.0.2

type Work struct {
	Build *resource.Build
}

type Worker

type Worker interface {
	Do(context.Context, *Work)
}

func FromContext

func FromContext(c context.Context) Worker

FromContext returns the worker queue associated with this context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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