container

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package container provides the definition of a Container and a container Builder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	// SetLogger sets the container interface logger.
	SetLogger(logger logr.Logger)
	// SetImageName sets the name used to tag the base image. The new tagged image is the one used to spawn the
	// container in place of the base one.
	SetImageName(name string)
	// SetContainerName sets the container name.
	SetContainerName(name string)
	// SetEnv sets the list of environment variable that must be provided to the container, in addition to the default
	// ones.
	SetEnv(env []string)
	// SetEntrypoint sets the container entrypoint.
	SetEntrypoint(entrypoint []string)
	// Build builds the container.
	Build() Container
}

Builder allows to build a new container.

type Container

type Container interface {
	// Start starts the container. It returns an error if the container was already started.
	Start(ctx context.Context) error
	// Wait waits for container termination. It returns an error if the container was not started or the container
	// process returned with an exit code different from zero.
	Wait(ctx context.Context) error
}

Container represents a container.

Directories

Path Synopsis
Package builder provides an implementation of container.Builder and container.Container leveraging containerd.
Package builder provides an implementation of container.Builder and container.Container leveraging containerd.

Jump to

Keyboard shortcuts

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