Documentation ¶
Index ¶
- type Container
- func (c *Container) Info(ctx context.Context) (*runtime.ContainerInfo, error)
- func (c *Container) Logs(ctx context.Context, since time.Time) (logging.LogReader, error)
- func (c *Container) Name() string
- func (c *Container) Remove(ctx context.Context) error
- func (c *Container) Start(ctx context.Context) error
- func (c *Container) Stats(ctx context.Context) (*runtime.ContainerStats, error)
- func (c *Container) Stop(ctx context.Context, timeout *time.Duration) error
- type Runtime
- func (r *Runtime) Close() error
- func (r *Runtime) CreateContainer(ctx context.Context, opts *runtime.ContainerOpts) (runtime.Container, error)
- func (r *Runtime) ListContainers(ctx context.Context) ([]runtime.Container, error)
- func (r *Runtime) PullImage(ctx context.Context, image *runtime.DockerImage, policy runtime.PullPolicy, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container wraps a Kubernetes container in the common runtime container interface. Note that standalone containers do not exist in Kubernetes; all containers are wrapped in a pod.
func (*Container) Logs ¶
Logs returns logging.LogReader which can be used to read log messages starting at the given time (inclusive). Set time to zero to read the full log.
func (*Container) Start ¶
Start does nothing on Kubernetes since containers are automatically started on creation.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime wraps the Kubernetes runtime in a common interface. The runtime must be used from within Kubernetes cluster. All methods are scoped to the current node.
func NewInClusterRuntime ¶
NewInClusterRuntime creates a new Kubernetes-backed Runtime from a process running in a Kubernetes cluster. The runtime is scoped to the current node.
func (*Runtime) CreateContainer ¶
func (r *Runtime) CreateContainer( ctx context.Context, opts *runtime.ContainerOpts, ) (runtime.Container, error)
CreateContainer creates a new container. The container is started implicitly.
func (*Runtime) ListContainers ¶
ListContainers enumerates all containers.