agent

package
v0.0.0-...-8a157a1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package agent contains the generic agent definition

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	// ImagePresent returns if an image specific by imageID exists.
	ImagePresent(imageID string) (bool, error)
	// DownloadImage downloads an image specified by imageID
	DownloadImage(imageID string) error
	// DeleteImage deletes an image from the image store by a given id
	DeleteImage(imageID string) error
	// CreateStationContainer creates a container based on a StationConfig.
	CreateStationContainer(config StationConfig) error
	// RunStationContainer runs a created station container specified by a containerID
	RunStationContainer(containerID string, quiet bool) (io.ReadCloser, error)
	// DestroyStationContainer destroys a station container specified by a containerID
	DestroyStationContainer(containerID string) error
	// BuildStationContainer builds a station container based on a station build config
	BuildStation(imageID string, config StationConfig) error
}

Agent defines a generic interface for working with station containers on an OCI runtime + OCI image tool

type AgentSign

type AgentSign string

AgentSign is a type for defining different underlying agents

const (
	// SIGN_DOCKER is the AgentSign for the docker agent
	SIGN_DOCKER AgentSign = "docker"
)

type StationConfig

type StationConfig struct {
	// ContainerID is the id of the station container
	ContainerID string
	// ImageID is the id of the image for the station to use
	// (either base or existing station image)
	ImageID string
	// Mounts are OCI Mounts for the station container (workspace mount)
	Mounts []ocispec.Mount
	// Process is the OCI process to execute on the staton container
	Process ocispec.Process
	// User is the OCI user which executes the specified process
	User ocispec.User
}

StationConfig models the configuration of a station to be spinned up and used

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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