input

package
v0.1.164 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 12 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoDelete added in v0.1.83

type AutoDelete struct {
	After string `json:"after,omitempty" yaml:"after,omitempty" validate:"duration"`
}

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"`
	Files       map[string]string `json:"files,omitempty" yaml:"files,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"`
	Priority int     `json:"priority,omitempty" yaml:"priority,omitempty" validate:"min=0,max=9"`
}

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"`
	Concurrency int    `json:"concurrency,omitempty" yaml:"concurrency,omitempty" validate:"min=0,max=99999"`
}

type Job

type Job struct {
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	Tags        []string          `json:"tags,omitempty" yaml:"tags,omitempty"`
	Tasks       []Task            `json:"tasks,omitempty" yaml:"tasks,omitempty" validate:"required,min=1,dive"`
	Inputs      map[string]string `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Secrets     map[string]string `json:"secrets,omitempty" yaml:"secrets,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"`
	Permissions []Permission      `json:"permissions,omitempty" yaml:"permissions,omitempty" validate:"dive"`
	AutoDelete  *AutoDelete       `json:"autoDelete,omitempty" yaml:"autoDelete,omitempty"`
	Wait        *Wait             `json:"wait,omitempty" yaml:"wait,omitempty"`
	// 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(ds datastore.Datastore) 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"`
	Opts   map[string]string `json:"opts,omitempty" yaml:"opts,omitempty"`
}

type Parallel

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

type Permission added in v0.1.80

type Permission struct {
	User string `json:"user,omitempty" yaml:"user,omitempty"`
	Role string `json:"role,omitempty" yaml:"role,omitempty"`
}

type Probe added in v0.1.131

type Probe struct {
	Path    string `json:"path,omitempty" yaml:"path,omitempty" validate:"required,max=256"`
	Port    int    `json:"port,omitempty" yaml:"port,omitempty" validate:"required,min=1,max=65535"`
	Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty" validate:"duration"`
}

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 Schedule added in v0.1.109

type Schedule struct {
	Cron string `json:"cron" yaml:"cron" validate:"required,cron"`
}

type ScheduledJob added in v0.1.109

type ScheduledJob struct {
	Name        string            `json:"name,omitempty" yaml:"name,omitempty" validate:"required"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	Tags        []string          `json:"tags,omitempty" yaml:"tags,omitempty"`
	Tasks       []Task            `json:"tasks,omitempty" yaml:"tasks,omitempty" validate:"required,min=1,dive"`
	Inputs      map[string]string `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Secrets     map[string]string `json:"secrets,omitempty" yaml:"secrets,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"`
	Permissions []Permission      `json:"permissions,omitempty" yaml:"permissions,omitempty" validate:"dive"`
	AutoDelete  *AutoDelete       `json:"autoDelete,omitempty" yaml:"autoDelete,omitempty"`
	Schedule    *Schedule         `json:"schedule,omitempty" yaml:"schedule,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*ScheduledJob) ID added in v0.1.109

func (ji *ScheduledJob) ID() string

func (*ScheduledJob) ToScheduledJob added in v0.1.109

func (ji *ScheduledJob) ToScheduledJob() *tork.ScheduledJob

func (ScheduledJob) Validate added in v0.1.109

func (ji ScheduledJob) Validate(ds datastore.Datastore) error

type SidecarTask added in v0.1.131

type SidecarTask 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"`
	Timeout     string            `json:"timeout,omitempty" yaml:"timeout,omitempty"`
	Probe       *Probe            `json:"probe,omitempty" yaml:"probe,omitempty"`
}

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"`
	Secrets     map[string]string `json:"secrets,omitempty" yaml:"secrets,omitempty"`
	AutoDelete  *AutoDelete       `json:"autoDelete,omitempty" yaml:"autoDelete,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"`
	Sidecars    []SidecarTask     `json:"sidecars,omitempty" yaml:"sidecars,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"`
	Tags        []string          `json:"tags,omitempty" yaml:"tags,omitempty"`
	Workdir     string            `json:"workdir,omitempty" yaml:"workdir,omitempty" validate:"max=256"`
	Priority    int               `json:"priority,omitempty" yaml:"priority,omitempty" validate:"min=0,max=9"`
}

type Wait added in v0.1.116

type Wait struct {
	Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty" validate:"duration,required"`
}

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"`
	Event   string            `json:"event,omitempty" yaml:"event,omitempty"`
	If      string            `json:"if,omitempty" yaml:"if,omitempty" validate:"expr"`
}

Jump to

Keyboard shortcuts

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