Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher is the central place which runs Pipelines. maxWorkers is based by default on number of CPUs * 2 accounting for modern CPU architectures.
func (*Dispatcher) RunPipelines ¶
func (dispatch *Dispatcher) RunPipelines(pipelines []Pipeliner) *Results
RunPipelines will run asynchronously all pipelines passed to it. It is limited only by the maxWorkers field on Dispatcher.
type FailureData ¶
FailureData is used to build the table output Example: "hash": "somehash". It is built as a struct to enforce order
type PipelineError ¶
type PipelineError struct {
PipelineName string
Data []FailureData
Error error
}
PipelineError is used to group errors based on PipelineName
type PipelineSuccess ¶
PipelineSuccess is returned by a pipeline if it encounters no errors
type Pipeliner ¶
type Pipeliner interface {
Name() string
Run() (*PipelineSuccess, error)
}
Pipeliner interface describes the requirements for pipelines the dispatcher can run
type Results ¶
type Results struct {
SuccessfulPipelines []PipelineSuccess
Errors []PipelineError
}
Results contains the aggregated results of both the succesful and error pipelines.