task

package
v0.0.0-...-0174093 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Statuses struct {
	Initialized string
	Ready       string
	Cancelled   string
	Received    string
	Finished    string
}

Functions

This section is empty.

Types

type Codec

type Codec struct{}

func (Codec) Decode

func (c Codec) Decode(rec record.R) (Task, error)

func (Codec) Encode

func (c Codec) Encode(task Task) (record.R, error)

type Option

type Option func(t *Task)

func WithID

func WithID(id string) Option

func WithInfo

func WithInfo(info record.R) Option

func WithInputs

func WithInputs(inputs ...resource.ID) Option

func WithOutputs

func WithOutputs(outputs ...resource.ID) Option

func WithProperty

func WithProperty(key string, value any) Option

type Task

type Task struct {
	Inputs  []resource.ID
	Outputs []resource.ID
	ID      string
	Info    record.R
}

func New

func New(options ...Option) Task

Jump to

Keyboard shortcuts

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