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 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. |
Click to show internal directories.
Click to hide internal directories.