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.
Click to show internal directories.
Click to hide internal directories.