runtime

package
v0.0.0-...-721f655 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package runtime provides basic interfaces to interact with the different container runtimes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

type Docker struct {
	// contains filtered or unexported fields
}

Docker is the another implementation for docker, the accessor of DockerCli.

func (*Docker) ImageExist

func (it *Docker) ImageExist(imageName string) (bool, error)

ImageExist implements the Local.ImageExist.

func (*Docker) ImageSave

func (it *Docker) ImageSave(imageName string, content io.Writer) error

ImageSave implements the Local.ImageSave.

func (*Docker) ListImages

func (it *Docker) ListImages(ctx context.Context) ([]agent.ContainerImage, error)

func (*Docker) LoadImage

func (it *Docker) LoadImage(ctx context.Context, content io.ReadCloser) error

LoadImage implements the Remote.LoadImage.

type Local

type Local interface {
	ImageExist(imageName string) (bool, error)
	ImageSave(imageName string, content io.Writer) error
}

Local means that the container runtime is running at the "client side"/"kubectl side". Local check the required image exists, and fetch the content of the image.

type Remote

type Remote interface {
	// LoadImage loads image from bytes.
	LoadImage(ctx context.Context, content io.ReadCloser) error

	ListImages(ctx context.Context) ([]agent.ContainerImage, error)
}

Remote means that the container runtime is running at the "server side"/"kubelet side". Remote load the content of the image into the container runtime.

Jump to

Keyboard shortcuts

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