input

package
v0.1.56 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuxTask

type AuxTask struct {
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	CMD         []string          `json:"cmd,omitempty" yaml:"cmd,omitempty"`
	Entrypoint  []string          `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
	Run         string            `json:"run,omitempty" yaml:"run,omitempty"`
	Image       string            `json:"image,omitempty" yaml:"image,omitempty"`
	Registry    *Registry         `json:"registry,omitempty" yaml:"registry,omitempty"`
	Env         map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
	Timeout     string            `json:"timeout,omitempty" yaml:"timeout,omitempty"`
}

type Defaults added in v0.1.13

type Defaults struct {
	Retry   *Retry  `json:"retry,omitempty" yaml:"retry,omitempty"`
	Limits  *Limits `json:"limits,omitempty" yaml:"limits,omitempty"`
	Timeout string  `json:"timeout,omitempty" yaml:"timeout,omitempty" validate:"duration"`
	Queue   string  `json:"queue,omitempty" yaml:"queue,omitempty" validate:"queue"`
}

func (Defaults) ToJobDefaults added in v0.1.13

func (d Defaults) ToJobDefaults() *tork.JobDefaults

type Each

type Each struct {
	Var  string `json:"var,omitempty" yaml:"var,omitempty" `
	List string `json:"list,omitempty" yaml:"list,omitempty" validate:"required,expr"`
	Task Task   `json:"task,omitempty" yaml:"task,omitempty" validate:"required"`
}

type Job

type Job struct {
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	Tasks       []Task            `json:"tasks,omitempty" yaml:"tasks,omitempty" validate:"required,min=1,dive"`
	Inputs      map[string]string `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Output      string            `json:"output,omitempty" yaml:"output,omitempty" validate:"expr"`
	Defaults    *Defaults         `json:"defaults,omitempty" yaml:"defaults,omitempty"`
	Webhooks    []Webhook         `json:"webhooks,omitempty" yaml:"webhooks,omitempty" validate:"dive"`
	// contains filtered or unexported fields
}

func (*Job) ID

func (ji *Job) ID() string

func (*Job) ToJob

func (ji *Job) ToJob() *tork.Job

func (Job) Validate

func (ji Job) Validate() error

type Limits

type Limits struct {
	CPUs   string `json:"cpus,omitempty" yaml:"cpus,omitempty"`
	Memory string `json:"memory,omitempty" yaml:"memory,omitempty"`
}

type Mount added in v0.1.14

type Mount struct {
	Type   string `json:"type,omitempty" yaml:"type,omitempty"`
	Source string `json:"source,omitempty" yaml:"source,omitempty"`
	Target string `json:"target,omitempty" yaml:"target,omitempty"`
}

type Parallel

type Parallel struct {
	Tasks []Task `json:"tasks,omitempty" yaml:"tasks,omitempty" validate:"required,min=1,dive"`
}

type Registry added in v0.1.11

type Registry struct {
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"`
}

type Retry

type Retry struct {
	Limit int `json:"limit,omitempty" yaml:"limit,omitempty" validate:"required,min=1,max=10"`
}

type SubJob

type SubJob struct {
	ID          string            `json:"id,omitempty"`
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	Tasks       []Task            `json:"tasks,omitempty" yaml:"tasks,omitempty" validate:"required"`
	Inputs      map[string]string `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Output      string            `json:"output,omitempty" yaml:"output,omitempty"`
	Detached    bool              `json:"detached,omitempty" yaml:"detached,omitempty"`
	Webhooks    []Webhook         `json:"webhooks,omitempty" yaml:"webhooks,omitempty" validate:"dive"`
}

type Task

type Task struct {
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	CMD         []string          `json:"cmd,omitempty" yaml:"cmd,omitempty"`
	Entrypoint  []string          `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
	Run         string            `json:"run,omitempty" yaml:"run,omitempty"`
	Image       string            `json:"image,omitempty" yaml:"image,omitempty"`
	Registry    *Registry         `json:"registry,omitempty" yaml:"registry,omitempty"`
	Env         map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
	Files       map[string]string `json:"files,omitempty" yaml:"files,omitempty"`
	Queue       string            `json:"queue,omitempty" yaml:"queue,omitempty" validate:"queue"`
	Pre         []AuxTask         `json:"pre,omitempty" yaml:"pre,omitempty" validate:"dive"`
	Post        []AuxTask         `json:"post,omitempty" yaml:"post,omitempty" validate:"dive"`
	Mounts      []Mount           `json:"mounts,omitempty" yaml:"mounts,omitempty" validate:"dive"`
	Networks    []string          `json:"networks,omitempty" yaml:"networks,omitempty"`
	Retry       *Retry            `json:"retry,omitempty" yaml:"retry,omitempty"`
	Limits      *Limits           `json:"limits,omitempty" yaml:"limits,omitempty"`
	Timeout     string            `json:"timeout,omitempty" yaml:"timeout,omitempty" validate:"duration"`
	Var         string            `json:"var,omitempty" yaml:"var,omitempty" validate:"max=64"`
	If          string            `json:"if,omitempty" yaml:"if,omitempty" validate:"expr"`
	Parallel    *Parallel         `json:"parallel,omitempty" yaml:"parallel,omitempty"`
	Each        *Each             `json:"each,omitempty" yaml:"each,omitempty"`
	SubJob      *SubJob           `json:"subjob,omitempty" yaml:"subjob,omitempty"`
	GPUs        string            `json:"gpus,omitempty" yaml:"gpus,omitempty"`
}

type Webhook added in v0.1.20

type Webhook struct {
	URL     string            `json:"url,omitempty" yaml:"url,omitempty" validate:"required"`
	Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}

Jump to

Keyboard shortcuts

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