task

package
v0.0.0-...-2db7b48 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Task contains everything needed by workers to execute and manage a workload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State byte

State describes a task at a specific moment in time.

const (
	Pending State = iota
	Scheduled
	Running
	Failed
	Completed
)

type Task

type Task struct {
	Id            uuid.UUID
	Name          string
	State         State
	Image         string
	Memory        int
	Disk          int
	ExposedPorts  nat.PortSet
	PortBindings  map[string]string
	RestartPolicy string
	StartTime     time.Time
	FinishTime    time.Time
}

Task holds all information about a task scheduled on a Worker.

type TaskEvent

type TaskEvent struct {
	Id        uuid.UUID
	State     State
	Timestamp time.Time
	Task      Task
}

TaskEvent represents desired transition states for scheduled tasks

Jump to

Keyboard shortcuts

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