furrow

package
v0.0.0-...-d95879a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2017 License: MPL-2.0 Imports: 2 Imported by: 4

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version()

Print the application's build info

Example
Version()
Output:

furrow (XYZ) built today

Types

type Broker

type Broker interface {
	// Close connection to broker
	Close()
	// Get a job from the broker
	GetJob(context.Context) (context.Context, *Job)
	// Finalize the job with the broker
	Finish(context.Context, JobStatus) error
}

type JobStatus

type JobStatus struct {
	// Job ID (from broker)
	ID uint64
	// Any errors that occured while running the job
	Err error
	// Whether to mark the job for reprocessing with the broker
	Bury bool
	// Exit code the job
	ExitCode int
	// Whether to send a notification back to the caller via the broker.
	// This is the name of the channel the caller is waiting on.
	Notify string
	// The output from the job
	Output string
}

The status of the job after processing

type Runner

type Runner interface {
	// Start the runner (if needed)
	Start()
	//Stop()
	// Run / execute a job
	Run(context.Context, *Job) JobStatus
}

Jump to

Keyboard shortcuts

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