loader

package
v0.0.0-...-41d593c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContainerImage

func GetContainerImage(imageName string, dockerClient dockerapi.DockerClient) (*types.ImageInspect, error)

GetContainerImage This function uses the DockerClient to inspect the image with the given name and tag.

func IsImageLoaded

func IsImageLoaded(imageName string, dockerClient dockerapi.DockerClient) (bool, error)

IsImageLoaded Common function for to check if a container image has been loaded

func IsNoSuchFileError

func IsNoSuchFileError(err error) bool

IsNoSuchFileError returns true if the error is of NoSuchFileError type

func IsUnsupportedPlatform

func IsUnsupportedPlatform(err error) bool

IsUnsupportedPlatform returns true if the error is of UnsupportedPlatformError type

func LoadFromFile

func LoadFromFile(ctx context.Context, path string, dockerClient dockerapi.DockerClient) error

LoadFromFile This function supports loading a container from a local file into docker

Types

type Loader

type Loader interface {
	LoadImage(ctx context.Context, cfg *config.Config, dockerClient dockerapi.DockerClient) (*types.ImageInspect, error)
	IsLoaded(dockerClient dockerapi.DockerClient) (bool, error)
}

Loader defines an interface for loading the container images. This is mostly to facilitate mocking and testing

type NoSuchFileError

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

NoSuchFileError wraps the error from the os package with the message "no such file error"

func NewNoSuchFileError

func NewNoSuchFileError(err error) NoSuchFileError

NewNoSuchFileError creates a new NoSuchFileError object

type UnsupportedPlatformError

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

UnsupportedPlatformError indicates an error when loading appnet container image on an unsupported OS platform

func NewUnsupportedPlatformError

func NewUnsupportedPlatformError(err error) UnsupportedPlatformError

NewUnsupportedPlatformError creates a new UnsupportedPlatformError object

Directories

Path Synopsis
Package mock_loader is a generated GoMock package.
Package mock_loader is a generated GoMock package.

Jump to

Keyboard shortcuts

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