 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
    const ( CmdStartEngine = "engine:start" CmdFinishEngine = "engine:finish" CmdStartTask = "task:start" CmdFinishTask = "task:finish" )
      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 = "engine.started" EventEngineFinished = "engine.finished" EventTaskStarted = "task.started" EventTaskFinished = "task.finished" EventTaskElected = "task.elected" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRealtedTaskToEventReuqest ¶ added in v0.39.0
type ElectTasksRequest ¶ added in v0.39.0
type Event ¶
type Event struct {
	Metadata     EventMetadata          `yaml:"metadata"`
	RelatedTasks []string               `yaml:"related-tasks"`
	Payload      map[string]interface{} `yaml:"payload"`
}
    Event - means that something happen
type EventMetadata ¶
type Options ¶
type Options struct {
	Name string
	// EventChan to write new event to the channel once a chance was applied
	EventChan chan *Event
	// CommandsChan to receive commands to create new change channel
	CommandsChan chan string
	// StateUpdateRequest to receive updated on the state in realtime
	StateUpdateRequest chan StateUpdateRequest
	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
	Services() []ServiceState
	StateBytes() ([]byte, error)
	EventBytes() ([]byte, error)
	StartProcess()
}
    State holds all the data of the pipeline execution flow
type StateUpdateRequest ¶ added in v0.39.0
type StateUpdateRequest struct {
	Metadata                     StateUpdateRequestMetadata
	ElectTasksRequest            *ElectTasksRequest
	AddRealtedTaskToEventReuqest *AddRealtedTaskToEventReuqest
	UpdateTaskStateRequest       *UpdateTaskStateRequest
	UpdateStateMetadataRequest   *UpdateStateMetadataRequest
}
    type StateUpdateRequestMetadata ¶ added in v0.39.0
type TaskState ¶
type TaskState struct {
	State  string    `yaml:"state"`
	Status string    `yaml:"status"`
	Task   task.Task `yaml:"task"`
	Output string    `yaml:"output"`
	Error  string    `yaml:"error"`
	Logger string    `yaml:"logger"`
}
    TaskState is a representation of a state of one task
type UpdateStateMetadataRequest ¶ added in v0.39.0
type UpdateTaskStateRequest ¶ added in v0.39.0
type UpdateTaskStateRequest struct {
	State TaskState
}
     Click to show internal directories. 
   Click to hide internal directories.