orca

package
v0.0.0-...-49d2269 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInsufficientResourcesAvailable = errors.New("orca: cannot schedule task, insufficient resources available")

Functions

This section is empty.

Types

type Orca

type Orca struct {
	// contains filtered or unexported fields
}

func (*Orca) DestroyTask

func (o *Orca) DestroyTask(ctx context.Context, taskId ulid.ULID, force bool) error

func (*Orca) InspectTask

func (o *Orca) InspectTask(ctx context.Context, taskId ulid.ULID) (*arkd.Task, error)

func (*Orca) ListTasks

func (o *Orca) ListTasks(ctx context.Context) ([]arkd.Task, error)

func (*Orca) StartTask

func (o *Orca) StartTask(ctx context.Context, taskDef arkd.TaskDefinition) ([]byte, error)

func (*Orca) StopTask

func (o *Orca) StopTask(ctx context.Context, taskId ulid.ULID, signal string) error

func (*Orca) WakeTask

func (o *Orca) WakeTask(ctx context.Context, taskId ulid.ULID) error

type Orchestrator

type Orchestrator interface {
	ListTasks(ctx context.Context) ([]arkd.Task, error)
	InspectTask(ctx context.Context, taskId ulid.ULID) (*arkd.Task, error)

	StartTask(ctx context.Context, taskDef arkd.TaskDefinition) ([]byte, error)
	StopTask(ctx context.Context, taskId ulid.ULID, signal string) error
	WakeTask(ctx context.Context, taskId ulid.ULID) error
	DestroyTask(ctx context.Context, taskId ulid.ULID, force bool) error
}

func Start

func Start(cfg config.Config, logger zerolog.Logger, moby *docker.Client, taskStore *arkd.TaskStore, pxy proxy.Proxy) (Orchestrator, error)

Jump to

Keyboard shortcuts

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