Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Plugin = taskplugin.New( "batch", "0.1", exec, taskplugin.WithConfig(validateConfigBatch, BatchConfig{}), taskplugin.WithContextFunc(ctxBatch), )
The batch plugin spawns X new µTask tasks, given a template and inputs, and waits for them to be completed. Resolver usernames can be dynamically set for the task
Functions ¶
This section is empty.
Types ¶
type BatchConfig ¶
type BatchConfig struct { TemplateName string `json:"template_name" binding:"required"` CommonInputs map[string]interface{} `json:"common_inputs"` CommonJSONInputs string `json:"common_json_inputs"` Inputs []map[string]interface{} `json:"inputs"` JSONInputs string `json:"json_inputs"` Comment string `json:"comment"` WatcherUsernames []string `json:"watcher_usernames"` WatcherGroups []string `json:"watcher_groups"` Tags map[string]string `json:"tags"` ResolverUsernames string `json:"resolver_usernames"` ResolverGroups string `json:"resolver_groups"` // How many tasks will run concurrently. 0 for infinity (default) SubBatchSize int `json:"sub_batch_size"` }
BatchConfig is the necessary configuration to spawn a new task
type BatchContext ¶
type BatchContext struct { ParentTaskID string `json:"parent_task_id"` RequesterUsername string `json:"requester_username"` RequesterGroups string `json:"requester_groups"` // RawMetadata of the previous run. Metadata are used to communicate batch progress between runs. It's returned // "as is" in case something goes wrong in a subsequent run, to know what the batch's progress was when the // error occured. RawMetadata quotedString `json:"metadata"` StepName string `json:"step_name"` // contains filtered or unexported fields }
BatchContext holds data about the parent task execution as well as the metadata of previous runs, if any.
type BatchMetadata ¶
type BatchMetadata struct { BatchID string `json:"batch_id"` RemainingTasks int64 `json:"remaining_tasks"` TasksStarted int64 `json:"tasks_started"` }
BatchMetadata holds batch-progress data, communicated between each run of the plugin.
Click to show internal directories.
Click to hide internal directories.