Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EngineStateInProgress pipeline in execution progress EngineStateInProgress string = "in-progress" // EngineStateFinished pipeline is finished execution EngineStateFinished string = "finished" // EngineStatusSuccess marks the engine as finished successfully EngineStatusSuccess = "Success" // EngineStatusFailed marks the engine as finished with error EngineStatusFailed = "failed" // TaskStateElected task is in progress TaskStateElected string = "elected" // TaskStateInProgress task is in progress TaskStateInProgress string = EngineStateInProgress // TaskStateFinished task is finished TaskStateFinished string = EngineStateFinished // TaskStatusSuccess set on the task status in case task was finished successfully TaskStatusSuccess = "Success" // TaskStatusFailed set on the task status in case task was finished with error TaskStatusFailed = "failed" )
View Source
const ( // EventEngineStarted fired when the engine started EventEngineStarted = "engine.started" // EventEngineFinished fired when the engine is finished EventEngineFinished = "engine.finished" // EventTaskStarted fired when task is started EventTaskStarted = "task.started" // EventTaskFinished fired when task is finished EventTaskFinished = "task.finished" // EventTaskElected fired when task is elected EventTaskElected = "task.elected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRealtedTaskToEventReuqest ¶
AddRealtedTaskToEventReuqest request to add related task to the event
type ElectTasksRequest ¶
ElectTasksRequest request to mark tasks as elected
type Options ¶
type Options struct { Name string // EventChan to write new event to the channel once a chance was applied EventChan chan *event.Event // CommandsChan to receive commands to create new change channel CommandsChan chan string // StateUpdateRequest to receive updated on the state in realtime StateUpdateRequest chan UpdateRequest Logger logger.Logger WG *sync.WaitGroup }
Options to pass to the state
type ServiceState ¶
type ServiceState struct { }
ServiceState is a representation of a state of one service
type State ¶
type State interface { Copy() (State, error) Tasks() map[string]TaskState Events() []event.Event Services() []ServiceState StateBytes() ([]byte, error) EventBytes() ([]byte, error) StartProcess() GetStepOutputInto(step string, target interface{}) error }
State holds all the data of the pipeline execution flow
type TaskState ¶
type TaskState struct { State string `yaml:"state"` Status string `yaml:"status"` Task task.Task `yaml:"task"` Times TaskTimes `yaml:"times"` Output string `yaml:"output"` Error error `yaml:"error"` Logger string `yaml:"logger"` }
TaskState is a representation of a state of one task
type UpdateRequest ¶
type UpdateRequest struct { Metadata UpdateRequestMetadata ElectTasksRequest *ElectTasksRequest AddRealtedTaskToEventReuqest *AddRealtedTaskToEventReuqest UpdateTaskStateRequest *UpdateTaskStateRequest UpdateStateMetadataRequest *UpdateStateMetadataRequest }
UpdateRequest request update the state
type UpdateRequestMetadata ¶
UpdateRequestMetadata metadata to UpdateRequest
type UpdateStateMetadataRequest ¶
UpdateStateMetadataRequest request to update task state metadata
type UpdateTaskStateRequest ¶
type UpdateTaskStateRequest struct {
State TaskState
}
UpdateTaskStateRequest request to update task state
Click to show internal directories.
Click to hide internal directories.