job

package
v0.0.0-...-fe73bcc Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: MIT Imports: 0 Imported by: 3

Documentation

Overview

Package job implements job handler abstraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Submit(Job)        // Requests a job to be processed
	Confirm(func(Job)) // Confirms that the given job has been (or will be) processed
	Process(func(Job)) // Processes a job
}

Handler defines the interface and properties of a job handler.

Properties:

JH1: Guarnteed response
	- Every submitted job is eventually confirmed

type Job

type Job interface {
}

Job represents a job.

type TransformationHandler

type TransformationHandler interface {
	Handler          // Inherits the Submit(...) and Confirm(...) from job.Handler
	Error(func(Job)) // Indicates that the transformation of the given job failed
}

TransformationHandler defines the interface and properties of a job transformation and processing abstraction.

Properties:

TH1: Guarnteed response
	- Every submitted job is eventually confirmed or its transformation fails
TH2: Soundness
	- A submitted job whose transformation fails is not processed

Directories

Path Synopsis
handler
async
Package async implements job.Handler interface.
Package async implements job.Handler interface.
sync
Package sync implements job.Handler interface.
Package sync implements job.Handler interface.
internal
handler/test
Package test implements end to end tests for job handler interface.
Package test implements end to end tests for job handler interface.
transformation/test
Package test implements end to end tests for job transformation interface.
Package test implements end to end tests for job transformation interface.
Package transformation implements Job-Transformation by buffering.
Package transformation implements Job-Transformation by buffering.

Jump to

Keyboard shortcuts

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