taskcluster-worker: github.com/taskcluster/taskcluster-worker/worker Index | Files

package worker

import "github.com/taskcluster/taskcluster-worker/worker"

Package worker is responsible for managing the claiming, executing, and resolution of tasks.


Package Files

config.go doc.go lifecyclecontext.go taskcounter.go worker.go


var ErrWorkerStoppedNow = errors.New("worker was interrupted by StopNow")

ErrWorkerStoppedNow is used to communicate that the worker was forcefully stopped. This could also be triggered by a plugin or engine.

func ConfigSchema Uses

func ConfigSchema() schematypes.Object

ConfigSchema returns the schema for configuration.

type Worker Uses

type Worker struct {
    // contains filtered or unexported fields

A Worker processes tasks

func New Uses

func New(config interface{}) (w *Worker, err error)

New creates a new Worker

func (*Worker) PayloadSchema Uses

func (w *Worker) PayloadSchema() schematypes.Schema

PayloadSchema returns the schema for task.payload

func (*Worker) Start Uses

func (w *Worker) Start() error

Start process tasks, returns ErrWorkerStoppedNow if not stopped gracefully.

func (*Worker) StopGracefully Uses

func (w *Worker) StopGracefully()

StopGracefully stops claiming new tasks and returns nil from Work() when all currently running tasks are done.

func (*Worker) StopNow Uses

func (w *Worker) StopNow()

StopNow aborts current tasks resolving worker-shutdown, and causes Work() to return an error.

Package worker imports 24 packages (graph) and is imported by 4 packages. Updated 2017-04-24. Refresh now. Tools for package owners.