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

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.


taskrunPackage taskrun provides abstractions to execute a run of a task given a task, engine, plugin, and other runtime objects required by plugin and engine.
workertestPackage workertest provides a framework for declarative definition of worker integration tests.
workertest/fakequeuePackage fakequeue provides a fake implementation of taskcluster-queue in golang, The FakeQueue server stores tasks in-memory, it doesn't validate authentication, but implements most end-points correctly.

Package worker imports 25 packages (graph) and is imported by 5 packages. Updated 2018-04-14. Refresh now. Tools for package owners.