package
3.2.4
Repository: https://github.com/ystia/yorc.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

CancelTask marks a task as Canceled.
CheckTaskStepStatusChange checks if a status change is allowed.
DeleteTask allows to delete a stored task.
EmitTaskEvent emits a task event based on task type Deprecated: use EmitTaskEventWithContextualLogs instead.
EmitTaskEventWithContextualLogs emits a task event based on task type.
GetAllTaskData returns all registered data for a task.
GetInstances retrieve instances in the context of this task.
GetQueryTaskIDs returns an array of taskID query-typed, optionally filtered by query and target.
GetTaskCreationDate retrieves the creationDate of a task.
GetTaskData retrieves data for tasks.
GetTaskInput retrieves inputs for tasks.
GetTaskRelatedNodes returns the list of nodes that are specifically targeted by this task Currently it only appens for scaling tasks.
GetTaskRelatedSteps returns the steps of the related workflow.
GetTaskResultSet retrieves the task related resultSet in json string format If no resultSet is found, nil is returned instead.
GetTasksIdsForTarget returns IDs of tasks related to a given targetID.
GetTaskStatus retrieves the TaskStatus of a task.
GetTaskStepStatus returns the step status of the related step name.
GetTaskTarget retrieves the targetID of a task.
GetTaskType retrieves the TaskType of a task.
IsAnotherLivingTaskAlreadyExistsError checks if an error is due to the fact that another task is currently running If true, it returns the taskID of the currently running task.
IsStepRegistrationInProgress checks if a task registration is still in progress, in which case it should not yet be executed.
IsTaskDataNotFoundError checks if an error is a task data not found error.
IsTaskNotFoundError checks if an error is a task not found error.
IsTaskRelatedNode checks if the given nodeName is declared as a task related node.
IsWorkflowTask returns true if the task type is related to workflow.
MonitorTaskCancellation runs a routine that will constantly check if a given task is requested to be cancelled If so and if the given f function is not nil then f is called and the routine stop itself.
MonitorTaskFailure runs a routine that will constantly check if a given task is tagged as failed.
NewAnotherLivingTaskAlreadyExistsError allows to create a new anotherLivingTaskAlreadyExistsError error.
NewCollector creates a Collector Deprecated: use collector.NewCollector instead.
NotifyErrorOnTask sets a flag that is used to notify task executors that a part of the task failed.
ParseTaskStatus attempts to convert a string to a TaskStatus.
ParseTaskStepStatus attempts to convert a string to a TaskStepStatus.
ParseTaskType attempts to convert a string to a TaskType.
ResumeTask marks a task as Initial to allow it being resumed Deprecated: use (c *collector.Collector) ResumeTask instead.
SetTaskData sets a data in the task's context.
SetTaskDataList sets a list of data into the task's context.
StoreOperations stores operations related to a task through a transaction splitting this transaction if needed, in which case it will create a key notifying a registration is in progress.
TargetHasLivingTasks checks if a targetID has associated tasks in status INITIAL or RUNNING and returns the id and status of the first one found Only Deploy, UnDeploy, ScaleOut, ScaleIn and Purge task type are considered.
TaskExists checks if a task with the given taskID exists.
TaskHasCancellationFlag check if a task has was flagged as canceled.
TaskHasErrorFlag check if a task has was flagged as error.
TaskStepExists checks if a task step exists with a stepID and related to a given taskID and returns it.
UpdateTaskStepStatus allows to update the task step status.
UpdateTaskStepWithStatus allows to update the task step status.

# Constants

TaskStatusCANCELED is a TaskStatus of type CANCELED.
TaskStatusDONE is a TaskStatus of type DONE.
TaskStatusFAILED is a TaskStatus of type FAILED.
TaskStatusINITIAL is a TaskStatus of type INITIAL.
TaskStatusRUNNING is a TaskStatus of type RUNNING.
TaskStepStatusCANCELED is a TaskStepStatus of type CANCELED.
TaskStepStatusDONE is a TaskStepStatus of type DONE.
TaskStepStatusERROR is a TaskStepStatus of type ERROR.
TaskStepStatusINITIAL is a TaskStepStatus of type INITIAL.
TaskStepStatusRUNNING is a TaskStepStatus of type RUNNING.
TaskTypeAction is a TaskType of type Action.
TaskTypeCustomCommand is a TaskType of type CustomCommand.
TaskTypeCustomWorkflow is a TaskType of type CustomWorkflow.
TaskTypeDeploy is a TaskType of type Deploy.
TaskTypeForcePurge is a TaskType of type ForcePurge.
TaskTypePurge is a TaskType of type Purge.
TaskTypeQuery is a TaskType of type Query.
TaskTypeScaleIn is a TaskType of type ScaleIn.
TaskTypeScaleOut is a TaskType of type ScaleOut.
TaskTypeUnDeploy is a TaskType of type UnDeploy.

# Structs

A Collector is used to register new tasks in Yorc Deprecated: use *collector.Collector instead.
TaskStep represents a step related to a workflow.

# Type aliases

TaskStatus x ENUM( INITIAL, RUNNING, DONE, FAILED, CANCELED ).
TaskStepStatus x ENUM( INITIAL, RUNNING, DONE, ERROR, CANCELED ).
TaskType x ENUM( Deploy, UnDeploy, ScaleOut, ScaleIn, Purge, CustomCommand, CustomWorkflow, Query, Action ForcePurge ).