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: 0

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