containers

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContainerdImageExists

func CheckContainerdImageExists(client *containerd.Client, ref string) bool

func CheckDockerImageExists

func CheckDockerImageExists(cli *client.Client, ref string) bool

func ContainerdIsAvailable

func ContainerdIsAvailable() bool

func CreateRegistry

func CreateRegistry(registryAddress string) (*registry.Registry, error)

func DockerIsAvailable

func DockerIsAvailable() bool

func FindNewDigest

func FindNewDigest(r ref.Ref) (string, error)

func GetContainerdClient

func GetContainerdClient() (*containerd.Client, error)

func GetDockerClient

func GetDockerClient() (*client.Client, error)

func GetFirstLayerFromContainerdImage

func GetFirstLayerFromContainerdImage(client *containerd.Client, ref *ToolRef, callback func(reader io.ReadCloser) error) error

func GetFirstLayerFromDockerImage

func GetFirstLayerFromDockerImage(cli *client.Client, ref *ToolRef, callback func(reader io.ReadCloser) error) error

func GetFirstLayerFromManifest

func GetFirstLayerFromManifest(ctx context.Context, rc *regclient.RegClient, m manifest.Manifest, callback func(reader io.ReadCloser) error) error

func GetFirstLayerFromRegistry

func GetFirstLayerFromRegistry(ctx context.Context, rc *regclient.RegClient, r ref.Ref, callback func(reader io.ReadCloser) error) error

func GetFirstLayerShaFromRegistry

func GetFirstLayerShaFromRegistry(image *ToolRef) (string, error)

func GetImageTags

func GetImageTags(t *ToolRef) ([]string, error)

func GetLayerFromManifestByIndex

func GetLayerFromManifestByIndex(ctx context.Context, rc *regclient.RegClient, m manifest.Manifest, index int, callback func(reader io.ReadCloser) error) error

func GetManifest

func GetManifest(ctx context.Context, rc *regclient.RegClient, r ref.Ref) (manifest.Manifest, error)

func GetPlatformManifestForLocalPlatform

func GetPlatformManifestForLocalPlatform(ctx context.Context, rc *regclient.RegClient, r ref.Ref) (manifest.Manifest, error)

func GetRegclient

func GetRegclient() *regclient.RegClient

func HeadManifest

func HeadManifest(ctx context.Context, rc *regclient.RegClient, r ref.Ref) (bool, error)

func HeadPlatformManifest

func HeadPlatformManifest(ctx context.Context, rc *regclient.RegClient, r ref.Ref, p platform.Platform) (bool, error)

func HeadPlatformManifestForLocalPlatform

func HeadPlatformManifestForLocalPlatform(ctx context.Context, rc *regclient.RegClient, r ref.Ref) (bool, error)

func ListDockerImagesByPrefix

func ListDockerImagesByPrefix(cli *client.Client, prefix string) ([]image.Summary, error)

func PullContainerdImage

func PullContainerdImage(client *containerd.Client, ref string) error

func PullDockerImage

func PullDockerImage(cli *client.Client, ref string) error

func ReadContainerdImage

func ReadContainerdImage(client *containerd.Client, ref string, callback func(reader io.ReadCloser) error) error

func ReadDockerImage

func ReadDockerImage(cli *client.Client, ref string, callback func(reader io.ReadCloser) error) error

func RemoveDockerImage

func RemoveDockerImage(cli *client.Client, ref string) error

func StartBackgroundRegistry

func StartBackgroundRegistry(registryAddress string, doShutdown *bool)

func StartRegistryWithCallback

func StartRegistryWithCallback(registryAddress string, callback func())

func UnpackLayerFromDockerImage

func UnpackLayerFromDockerImage(buffer io.ReadCloser, sha256 string, callback func(reader io.ReadCloser) error) error

Types

type ToolRef

type ToolRef struct {
	Registry   string
	Repository string

	Tool    string
	Version string
	// contains filtered or unexported fields
}

func FindToolRef

func FindToolRef(registries, repositories []string, tool, version string) (*ToolRef, error)

func NewToolRef

func NewToolRef(registry, repository, tool, version string) *ToolRef

func (*ToolRef) GetRef

func (t *ToolRef) GetRef() ref.Ref

func (*ToolRef) Key

func (t *ToolRef) Key() string

func (*ToolRef) ManifestExists

func (t *ToolRef) ManifestExists() bool

func (*ToolRef) String

func (t *ToolRef) String() string

Jump to

Keyboard shortcuts

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