Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownStatus = errors.New("unknown job status") ErrUnknownWorkflow = errors.New("unknown workflow") )
Functions ¶
func DeserializeExecutionResult ¶ added in v0.0.3
func DeserializeExecutionResult[T ExecutionResult](s SerializedExecutionResult) (*T, error)
Types ¶
type DeprovisionNodeExecutionResult ¶ added in v0.0.3
type DeprovisionNodeExecutionResult struct {
ResourcesFailedToDelete []string `json:"resourcesFailedToDelete,omitempty"`
FailedStep *string `json:"failedStep,omitempty"`
Errors []string `json:"errors,omitempty"`
}
func NewDeprovisionNodeExecutionResult ¶ added in v0.0.3
func NewDeprovisionNodeExecutionResult(step string) DeprovisionNodeExecutionResult
func (DeprovisionNodeExecutionResult) GetFailedStep ¶ added in v0.0.3
func (r DeprovisionNodeExecutionResult) GetFailedStep() string
func (DeprovisionNodeExecutionResult) Serialize ¶ added in v0.0.3
func (r DeprovisionNodeExecutionResult) Serialize() (SerializedExecutionResult, error)
type Execution ¶
type Execution struct {
Identifier ExecutionIdentifier
Workflow WorkflowName
Status Status
Created time.Time
Updated time.Time
Finished *time.Time
Results SerializedExecutionResult
}
func NewExecution ¶
func NewExecution(id ExecutionIdentifier, workflow WorkflowName) *Execution
type ExecutionIdentifier ¶
type ExecutionIdentifier string
func ExecutionIdentifierFromString ¶
func ExecutionIdentifierFromString(id string) (ExecutionIdentifier, error)
func FormExecutionIdentifier ¶
func FormExecutionIdentifier(workflow WorkflowName) ExecutionIdentifier
func (ExecutionIdentifier) String ¶
func (id ExecutionIdentifier) String() string
type ExecutionResult ¶ added in v0.0.3
type ExecutionResult interface {
Serialize() (SerializedExecutionResult, error)
}
type ProvisionNodeExecutionResult ¶ added in v0.0.3
type ProvisionNodeExecutionResult struct {
Node *string `json:"nodeId,omitempty"`
FailedStep *string `json:"failedStep,omitempty"`
Errors []string `json:"errors,omitempty"`
}
func NewProvisionNodeExecutionResult ¶ added in v0.0.3
func NewProvisionNodeExecutionResult(step string) ProvisionNodeExecutionResult
func (ProvisionNodeExecutionResult) GetFailedStep ¶ added in v0.0.3
func (r ProvisionNodeExecutionResult) GetFailedStep() string
func (ProvisionNodeExecutionResult) GetNode ¶ added in v0.0.3
func (r ProvisionNodeExecutionResult) GetNode() string
func (ProvisionNodeExecutionResult) Serialize ¶ added in v0.0.3
func (r ProvisionNodeExecutionResult) Serialize() (SerializedExecutionResult, error)
type SerializedExecutionResult ¶ added in v0.0.3
type SerializedExecutionResult string
func (SerializedExecutionResult) IsEmpty ¶ added in v0.0.3
func (r SerializedExecutionResult) IsEmpty() bool
func (SerializedExecutionResult) String ¶ added in v0.0.3
func (r SerializedExecutionResult) String() string
type WorkflowName ¶
type WorkflowName int
const ( WorkflowNameUnknown WorkflowName = iota WorkflowNameProvisionNode WorkflowNameDeprovisionNode )
func WorkflowNameFromString ¶
func WorkflowNameFromString(s string) (WorkflowName, error)
func (WorkflowName) String ¶
func (n WorkflowName) String() string
Click to show internal directories.
Click to hide internal directories.