Documentation
¶
Index ¶
- Variables
- type ContainerdRuntime
- func (c *ContainerdRuntime) Close() error
- func (c *ContainerdRuntime) GetImage(ctx context.Context, ref string) (*ImageInfo, error)
- func (c *ContainerdRuntime) GetImageWithPlatform(ctx context.Context, ref, platform string) (*ImageInfo, error)
- func (c *ContainerdRuntime) LoadImage(ctx context.Context, inputPath string) error
- func (c *ContainerdRuntime) LoadImageFromReader(ctx context.Context, r io.Reader) error
- func (c *ContainerdRuntime) Name() string
- func (c *ContainerdRuntime) SaveImage(ctx context.Context, ref, outputPath string) error
- type DockerRuntime
- func (d *DockerRuntime) Close() error
- func (d *DockerRuntime) GetImage(ctx context.Context, ref string) (*ImageInfo, error)
- func (d *DockerRuntime) GetImageWithPlatform(ctx context.Context, ref, platform string) (*ImageInfo, error)
- func (d *DockerRuntime) LoadImage(ctx context.Context, inputPath string) error
- func (d *DockerRuntime) LoadImageFromReader(ctx context.Context, r io.Reader) error
- func (d *DockerRuntime) Name() string
- func (d *DockerRuntime) SaveImage(ctx context.Context, ref, outputPath string) error
- type ImageInfo
- type LayerInfo
- type Runtime
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRuntimeAvailable = errors.New("no container runtime (docker or containerd) available") ErrImageNotFound = errors.New("image not found") )
Functions ¶
This section is empty.
Types ¶
type ContainerdRuntime ¶
type ContainerdRuntime struct {
// contains filtered or unexported fields
}
func NewContainerdRuntime ¶
func NewContainerdRuntime() (*ContainerdRuntime, error)
func (*ContainerdRuntime) Close ¶
func (c *ContainerdRuntime) Close() error
func (*ContainerdRuntime) GetImageWithPlatform ¶ added in v0.3.1
func (*ContainerdRuntime) LoadImage ¶
func (c *ContainerdRuntime) LoadImage(ctx context.Context, inputPath string) error
func (*ContainerdRuntime) LoadImageFromReader ¶
func (*ContainerdRuntime) Name ¶
func (c *ContainerdRuntime) Name() string
type DockerRuntime ¶
type DockerRuntime struct{}
func NewDockerRuntime ¶
func NewDockerRuntime() (*DockerRuntime, error)
func (*DockerRuntime) Close ¶
func (d *DockerRuntime) Close() error
func (*DockerRuntime) GetImageWithPlatform ¶ added in v0.3.1
func (*DockerRuntime) LoadImage ¶
func (d *DockerRuntime) LoadImage(ctx context.Context, inputPath string) error
func (*DockerRuntime) LoadImageFromReader ¶
func (*DockerRuntime) Name ¶
func (d *DockerRuntime) Name() string
type Runtime ¶
type Runtime interface {
// Name returns the runtime name (docker, containerd, etc.)
Name() string
// GetImage retrieves image information
GetImage(ctx context.Context, ref string) (*ImageInfo, error)
// GetImageWithPlatform retrieves image information for a specific platform
// If the image doesn't exist locally, it will be pulled for the specified platform
GetImageWithPlatform(ctx context.Context, ref, platform string) (*ImageInfo, error)
// SaveImage saves an image to a file
SaveImage(ctx context.Context, ref, outputPath string) error
// LoadImage loads an image from a file
LoadImage(ctx context.Context, inputPath string) error
// LoadImageFromReader loads an image from a reader
LoadImageFromReader(ctx context.Context, r io.Reader) error
// Close closes the runtime client
Close() error
}
Runtime represents a container runtime interface
func DetectRuntime ¶
DetectRuntime tries to detect available container runtime
Click to show internal directories.
Click to hide internal directories.