Documentation ¶
Index ¶
- func GetContainerImage(imageName string, dockerClient dockerapi.DockerClient) (*types.ImageInspect, error)
- func IsImageLoaded(imageName string, dockerClient dockerapi.DockerClient) (bool, error)
- func IsNoSuchFileError(err error) bool
- func IsUnsupportedPlatform(err error) bool
- func LoadFromFile(ctx context.Context, path string, dockerClient dockerapi.DockerClient) error
- type Loader
- type NoSuchFileError
- type UnsupportedPlatformError
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 ¶
IsNoSuchFileError returns true if the error is of NoSuchFileError type
func IsUnsupportedPlatform ¶
IsUnsupportedPlatform returns true if the error is of UnsupportedPlatformError type
func LoadFromFile ¶
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