job

package
v0.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddJobEvent

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

func StartJob

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

Types

type Job

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

type JobStatus added in v0.16.0

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

func GetTaskStatus added in v0.16.0

func GetTaskStatus(cfg *target.BaseTargetConfig, jobID, jobType string, responseResult interface{}) (*JobStatus, error)

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 Task added in v0.16.0

type Task struct {
	JobID      string      `json:"jobId"`
	JobType    string      `json:"jobType"`
	Status     JobStatus   `json:"status"`
	LastUpdate time.Time   `json:"lastUpdate"`
	Result     interface{} `json:"result"`
}

type TaskStatusResponse added in v0.16.0

type TaskStatusResponse struct {
	TaskResponse Task `json:"jobTask"`
}

Jump to

Keyboard shortcuts

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