runner

package
v0.0.0-...-c3677c5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 24 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReporter

func NewReporter(metrics metrics.Reporter) metrics.Reporter

NewReporter returns a Reporter that implements the tagger interface

Types

type Runner

type Runner struct {
	StoppedChan chan struct{}
	UpdatesChan chan Update
	// contains filtered or unexported fields
}

Runner maintains in memory state for the Task runner

func StartTaskWithRuntime

func StartTaskWithRuntime(ctx context.Context, task Task, m metrics.Reporter, rp runtimeTypes.ContainerRuntimeProvider, cfg config.Config) (*Runner, error)

StartTaskWithRuntime builds an Executor using the provided Runtime factory func, and starts the task

func (*Runner) Kill

func (r *Runner) Kill()

Kill is idempotent, and will either kill a Task, or prevent a new one from being spawned

type Task

type Task struct {
	TaskID  string
	Pod     *corev1.Pod
	PodLock *sync.Mutex
}

Task contains all information for running a task

type Update

type Update struct {
	ContainerID             string
	TaskID                  string
	State                   titusdriver.TitusTaskState
	Mesg                    string
	Details                 *runtimeTypes.Details
	ExtraContainerStatuses  []v1.ContainerStatus
	PlatformSidecarStatuses []v1.ContainerStatus
}

Update encapsulates information on the updatechan about Task status updates

Jump to

Keyboard shortcuts

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