Documentation
¶
Index ¶
- Variables
- func AddSubtaskEvent(ctx context.Context, cfg *types.BaseTargetConfig, ...)
- func AddTaskEvent(ctx context.Context, cfg *types.BaseTargetConfig, jobID, jobType string, ...)
- func StartJob(ctx context.Context, cfg *types.BaseTargetConfig) (string, error)
- func UpdateJobEvent(cfg *types.BaseTargetConfig, jobID string, status JobStatus, inputErr error)
- type Job
- type JobStatus
- type Response
- type Subtask
- type SubtaskEventUpdater
- type SubtaskResponse
- type Task
- type TaskEventUpdater
- type TaskPart
- type TaskResult
Constants ¶
This section is empty.
Variables ¶
View Source
var AllJobStatus = []JobStatus{ Started, InProgress, DataRetrieve, DataUpload, Queued, DataProcessing, Completed, Failed, Skipped, TimeOut, }
Functions ¶
func AddSubtaskEvent ¶ added in v0.17.0
func AddTaskEvent ¶ added in v0.17.0
func AddTaskEvent(ctx context.Context, cfg *types.BaseTargetConfig, jobID, jobType string, status JobStatus, taskResults []TaskResult, warnings []string, errors []error)
func UpdateJobEvent ¶ added in v0.17.0
func UpdateJobEvent(cfg *types.BaseTargetConfig, jobID string, status JobStatus, inputErr error)
Types ¶
type JobStatus ¶ added in v0.16.0
type JobStatus int
func (JobStatus) MarshalJSON ¶ added in v0.16.0
func (*JobStatus) UnmarshalJSON ¶ added in v0.16.0
type Subtask ¶ added in v0.17.0
type Subtask struct { JobID string `json:"jobId"` JobType string `json:"jobType"` SubtaskId string `json:"subtaskId"` Status JobStatus `json:"status"` LastUpdate time.Time `json:"lastUpdate"` Result interface{} `json:"result"` Errors []string `json:"errors"` }
func GetSubtask ¶ added in v0.17.0
type SubtaskEventUpdater ¶ added in v0.19.0
type SubtaskResponse ¶ added in v0.17.0
type SubtaskResponse struct {
SubtaskResponse Subtask `json:"jobSubtask"`
}
type Task ¶ added in v0.16.0
type Task interface { IsClientValid(ctx context.Context, c plugin.PluginClient) (bool, error) GetParts() []TaskPart GetTaskResults() []TaskResult }
type TaskEventUpdater ¶ added in v0.19.0
type TaskEventUpdater interface { SetStatusToStarted(ctx context.Context) SetStatusToDataRetrieve(ctx context.Context) SetStatusToDataUpload(ctx context.Context) SetStatusToQueued(ctx context.Context) SetStatusToDataProcessing(ctx context.Context) SetStatusToCompleted(ctx context.Context, results []TaskResult) SetStatusToFailed(ctx context.Context, err error) SetStatusToSkipped(ctx context.Context) GetSubtaskEventUpdater(subtask string) SubtaskEventUpdater }
func NewTaskEventUpdater ¶ added in v0.20.0
func NewTaskEventUpdater(cfg *types.BaseTargetConfig, jobId, jobType string, warningCollector logging.WarningCollector) TaskEventUpdater
Click to show internal directories.
Click to hide internal directories.