v1working

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//RunErrCodeUnexpected is presented to the api when an unexpected error occured during the run of the task
	RunErrCodeUnexpected = "ERR_UNEXPECTED"

	//RunResultUndefined is send to the server when
	RunResultUndefined = "-"
)

Functions

func RemoveContents

func RemoveContents(dir string) error

Types

type Conf

type Conf struct {
	ReceiveTimeout    time.Duration
	HeartbeatInterval time.Duration
}

Conf holds worker configuration

func DefaultConf

func DefaultConf() *Conf

DefaultConf creates a sensible configuration

type Worker

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

Worker is a longer running process that spawns processes based on task runs that arrive via the batch client

func NewWorker

func NewWorker(logger *log.Logger, batchClient workerClient, qops v1batch.QueueOps, projectID string, queueID string, baseExec string, baseArgs []string, uploadConf *v1datatransfer.UploadConfig, conf *Conf) (w *Worker)

NewWorker creates a worker based on the provided configuration

func (*Worker) Start

func (w *Worker) Start(ctx context.Context)

Start will block and begins handling tasks run. It stops when context ctx ends

Jump to

Keyboard shortcuts

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