job

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddSubtaskEvent added in v0.17.0

func AddSubtaskEvent(cfg *target.BaseTargetConfig, jobID, jobType, subtask string, status JobStatus)

func AddTaskEvent added in v0.17.0

func AddTaskEvent(cfg *target.BaseTargetConfig, jobID, jobType string, status JobStatus)

func StartJob

func StartJob(cfg *target.BaseTargetConfig) (string, error)

func UpdateJobEvent added in v0.17.0

func UpdateJobEvent(cfg *target.BaseTargetConfig, jobID string, status JobStatus)

Types

type Job

type Job struct {
	JobID *string `json:"jobId"`
}

type JobStatus added in v0.16.0

type JobStatus int
const (
	Started JobStatus = iota
	InProgress
	DataRetrieve
	DataUpload
	Queued
	DataProcessing
	Completed
	Failed
	Skipped
)

func (JobStatus) IsRunning added in v0.16.0

func (e JobStatus) IsRunning() bool

func (JobStatus) IsValid added in v0.16.0

func (e JobStatus) IsValid() bool

func (JobStatus) MarshalJSON added in v0.16.0

func (e JobStatus) MarshalJSON() ([]byte, error)

func (JobStatus) String added in v0.16.0

func (e JobStatus) String() string

func (*JobStatus) UnmarshalJSON added in v0.16.0

func (e *JobStatus) UnmarshalJSON(b []byte) error

type Response

type Response struct {
	Job Job `json:"createJob"`
}

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

func GetSubtask(cfg *target.BaseTargetConfig, jobID, jobType, subtaskId string, responseResult interface{}) (*Subtask, error)

type SubtaskResponse added in v0.17.0

type SubtaskResponse struct {
	SubtaskResponse Subtask `json:"jobSubtask"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL