task

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunIfSuccess = "success"
	RunIfFailure = "failure"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FlexStrings

type FlexStrings []string

func (*FlexStrings) UnmarshalJSON

func (f *FlexStrings) UnmarshalJSON(data []byte) error

type Mode

type Mode string
const (
	ModeInfer Mode = "infer"
	ModeTrain Mode = "train"
)

type State

type State uint8
const (
	Pending State = iota
	Scheduled
	Running
	Completed
	Failed
	Skipped
	Interrupted
)

func (State) IsTerminal

func (s State) IsTerminal() bool

func (State) String

func (s State) String() string

type Task

type Task struct {
	ID                string                     `json:"id"`
	Name              string                     `json:"name"`
	Kind              TaskKind                   `json:"kind,omitempty"`
	State             State                      `json:"state"`
	ImageURL          string                     `json:"image_url,omitempty"`
	File              []byte                     `json:"file,omitempty"`
	CLIArgs           []string                   `json:"cli_args"`
	Inputs            FlexStrings                `json:"inputs,omitempty"`
	Env               map[string]string          `json:"env,omitempty"`
	Daemon            bool                       `json:"daemon"`
	Encrypted         bool                       `json:"encrypted"`
	KBSResourcePath   string                     `json:"kbs_resource_path,omitempty"`
	PropletID         string                     `json:"proplet_id,omitempty"`
	DependsOn         []string                   `json:"depends_on,omitempty"`
	RunIf             string                     `json:"run_if,omitempty"`
	WorkflowID        string                     `json:"workflow_id,omitempty"`
	JobID             string                     `json:"job_id,omitempty"`
	Results           any                        `json:"results,omitempty"`
	Error             string                     `json:"error,omitempty"`
	MonitoringProfile *proplet.MonitoringProfile `json:"monitoring_profile,omitempty"`
	StartTime         time.Time                  `json:"start_time"`
	FinishTime        time.Time                  `json:"finish_time"`
	CreatedAt         time.Time                  `json:"created_at"`
	UpdatedAt         time.Time                  `json:"updated_at"`
	Mode              Mode                       `json:"mode,omitempty"`
	Schedule          string                     `json:"schedule,omitempty"`
	NextRun           time.Time                  `json:"next_run"`
	IsRecurring       bool                       `json:"is_recurring,omitempty"`
	Timezone          string                     `json:"timezone,omitempty"`
	Priority          int                        `json:"priority,omitempty"`
}

type TaskKind

type TaskKind string
const (
	TaskKindStandard  TaskKind = "standard"
	TaskKindFederated TaskKind = "federated"
)

type TaskPage

type TaskPage struct {
	Offset uint64 `json:"offset"`
	Limit  uint64 `json:"limit"`
	Total  uint64 `json:"total"`
	Tasks  []Task `json:"tasks"`
}

Jump to

Keyboard shortcuts

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