runtime

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDocker

func NewDocker(client *dockerclient.Client, opts ...dockerOption) *docker

func NewKubernetes added in v0.0.29

func NewKubernetes(client clientcorev1.CoreV1Interface, opts ...kubernetesOption) *kubernetes

func WithContext

func WithContext(ctx context.Context) func(*docker)

func WithHidePullOutput added in v0.0.16

func WithHidePullOutput(hide bool) func(*docker)

func WithLogger

func WithLogger(logger logr.Logger) func(*docker)

Types

type Await

type Await interface {
	Wait() error
}

type ContainerSpec

type ContainerSpec struct {
	Name            string
	Args            []string
	Command         []string
	Image           string
	ImagePullPolicy PullImagePolicy
	Stdin           bool
	TTY             bool
	Env             map[string]string
	Uid             *int
	Guid            *int
	PWD             string
	RestartPolicy   RestartPolicy
	Volumes         []Volume
}

func GetContainerSpecByName

func GetContainerSpecByName(pod *Pod, name string) (ContainerSpec, error)

type ContainerStatus

type ContainerStatus struct {
	ContainerID string
	ContainerIP string
	Name        string
	Ready       bool
	Started     bool
	ExitCode    int
}

func GetContainerStatusByID

func GetContainerStatusByID(pod *Pod, id string) (ContainerStatus, error)

func GetContainerStatusByName

func GetContainerStatusByName(pod *Pod, name string) (ContainerStatus, error)

type Event

type Event struct {
	Container string
	ExitCode  int
	Type      EventType
	Error     error
}

type EventType

type EventType string
var (
	EventTypeError   EventType = "error"
	EventTypeStart   EventType = "start"
	EventTypeRestart EventType = "restart"
	EventTypeExit    EventType = "exit"
	EventTypeDelete  EventType = "delete"
)

type Interface

type Interface interface {
	CreatePod(ctx context.Context, pod *Pod, stdin io.Reader, stdout, stderr io.Writer) (Await, error)
	DeletePod(ctx context.Context, pod *Pod, timeout time.Duration) error
}

type Pod

type Pod struct {
	Name   string
	Spec   PodSpec
	Status PodStatus
}

type PodSpec

type PodSpec struct {
	Containers     []ContainerSpec
	InitContainers []ContainerSpec
}

type PodStatus

type PodStatus struct {
	PodIP          string
	Containers     []ContainerStatus
	InitContainers []ContainerStatus
}

type PullImagePolicy

type PullImagePolicy string
var (
	PullImagePolicyAlways  PullImagePolicy = "Always"
	PullImagePolicyNever   PullImagePolicy = "Never"
	PullImagePolicyMissing PullImagePolicy = "Missing"
)

type RestartPolicy

type RestartPolicy string
var (
	RestartPolicyNever     RestartPolicy = "Never"
	RestartPolicyOnFailure RestartPolicy = "OnFailure"
	RestartPolicyAlways    RestartPolicy = "Always"
)

type Result

type Result struct {
	ExitCode int
}

func (*Result) Error

func (e *Result) Error() string

type Volume

type Volume struct {
	Name     string
	Path     string
	HostPath string
}

Jump to

Keyboard shortcuts

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