Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- Constants
- type ContainerdHandler
- func (handle *ContainerdHandler) DigestExists(ctx context.Context, dgst digest.Digest) (exists bool, err error)
- func (handle *ContainerdHandler) FetchImage(ctx context.Context, name, plat string, onProgress func(float64)) (err error)
- func (handle *ContainerdHandler) FinalizeImage(ctx context.Context, image ocispec.Image) error
- func (handle *ContainerdHandler) ListManifests(ctx context.Context) (manifests []ocispec.Manifest, err error)
- func (handle *ContainerdHandler) PushDigest(ctx context.Context, ref string, desc ocispec.Descriptor, reader io.Reader, ...) (err error)
- func (handle *ContainerdHandler) PushImage(ctx context.Context, ref string, target *ocispec.Descriptor) error
- func (handle *ContainerdHandler) ResolveImage(ctx context.Context, fullref string) (imgspec ocispec.Image, err error)
- func (handle *ContainerdHandler) UnpackImage(ctx context.Context, ref string, dest string) (err error)
- type DescriptorResolver
- type DigestPusher
- type DigestResolver
- type DirectoryHandler
- func (handle *DirectoryHandler) DigestExists(ctx context.Context, dgst digest.Digest) (exists bool, err error)
- func (handle *DirectoryHandler) FetchImage(ctx context.Context, fullref, platform string, onProgress func(float64)) (err error)
- func (handle *DirectoryHandler) FinalizeImage(ctx context.Context, image ocispec.Image) error
- func (handle *DirectoryHandler) ListManifests(ctx context.Context) (manifests []ocispec.Manifest, err error)
- func (handle *DirectoryHandler) PushDigest(ctx context.Context, ref string, desc ocispec.Descriptor, reader io.Reader, ...) error
- func (handle *DirectoryHandler) PushImage(ctx context.Context, ref string, target *ocispec.Descriptor) error
- func (handle *DirectoryHandler) ResolveImage(ctx context.Context, fullref string) (imgspec ocispec.Image, err error)
- func (handle *DirectoryHandler) UnpackImage(ctx context.Context, ref string, dest string) (err error)
- type Handler
- type ImageFetcher
- type ImagePusher
- type ImageResolver
- type ImageUnpacker
- type ManifestLister
Constants ¶
const ( ContainerdGCLayerPrefix = "containerd.io/gc.ref.content.l" ContainerdGCContentPrefix = "containerd.io/gc.ref.content" )
const ( DirectoryHandlerManifestsDir = "manifests" DirectoryHandlerConfigsDir = "configs" DirectoryHandlerLayersDir = "layers" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerdHandler ¶
type ContainerdHandler struct {
// contains filtered or unexported fields
}
func NewContainerdHandler ¶
func NewContainerdHandler(ctx context.Context, address, namespace string, opts ...containerd.ClientOpt) (context.Context, *ContainerdHandler, error)
NewContainerdHandler creates a Resolver-compatible interface given the containerd address and namespace.
func NewContainerdWithClient ¶
func NewContainerdWithClient(ctx context.Context, client *containerd.Client) (context.Context, *ContainerdHandler, error)
NewContainerdWithClient create a containerd Resolver-compatible with an existing containerd client connection.
func (*ContainerdHandler) DigestExists ¶
func (handle *ContainerdHandler) DigestExists(ctx context.Context, dgst digest.Digest) (exists bool, err error)
DigestExists implements DigestResolver.
func (*ContainerdHandler) FetchImage ¶
func (handle *ContainerdHandler) FetchImage(ctx context.Context, name, plat string, onProgress func(float64)) (err error)
FetchImage implements ImageFetcher.
func (*ContainerdHandler) FinalizeImage ¶
FinalizeImage implements ImageFinalizer.
func (*ContainerdHandler) ListManifests ¶
func (handle *ContainerdHandler) ListManifests(ctx context.Context) (manifests []ocispec.Manifest, err error)
ListManifests implements DigestResolver.
func (*ContainerdHandler) PushDigest ¶
func (handle *ContainerdHandler) PushDigest(ctx context.Context, ref string, desc ocispec.Descriptor, reader io.Reader, onProgress func(float64)) (err error)
PushDigest implements DigestPusher.
func (*ContainerdHandler) PushImage ¶
func (handle *ContainerdHandler) PushImage(ctx context.Context, ref string, target *ocispec.Descriptor) error
PushImage implements ImagePusher.
func (*ContainerdHandler) ResolveImage ¶
func (handle *ContainerdHandler) ResolveImage(ctx context.Context, fullref string) (imgspec ocispec.Image, err error)
ResolveImage implements ImageResolver.
func (*ContainerdHandler) UnpackImage ¶
func (handle *ContainerdHandler) UnpackImage(ctx context.Context, ref string, dest string) (err error)
UnpackImage implements ImageUnpacker.
type DescriptorResolver ¶
type DigestPusher ¶
type DigestResolver ¶
type DirectoryHandler ¶ added in v0.6.4
type DirectoryHandler struct {
// contains filtered or unexported fields
}
func NewDirectoryHandler ¶ added in v0.6.4
func NewDirectoryHandler(path string) (*DirectoryHandler, error)
func (*DirectoryHandler) DigestExists ¶ added in v0.6.4
func (handle *DirectoryHandler) DigestExists(ctx context.Context, dgst digest.Digest) (exists bool, err error)
DigestExists implements DigestResolver.
func (*DirectoryHandler) FetchImage ¶ added in v0.6.4
func (handle *DirectoryHandler) FetchImage(ctx context.Context, fullref, platform string, onProgress func(float64)) (err error)
FetchImage implements ImageFetcher.
func (*DirectoryHandler) FinalizeImage ¶ added in v0.6.4
FinalizeImage implements ImageFinalizer.
func (*DirectoryHandler) ListManifests ¶ added in v0.6.4
func (handle *DirectoryHandler) ListManifests(ctx context.Context) (manifests []ocispec.Manifest, err error)
ListManifests implements DigestResolver.
func (*DirectoryHandler) PushDigest ¶ added in v0.6.4
func (handle *DirectoryHandler) PushDigest(ctx context.Context, ref string, desc ocispec.Descriptor, reader io.Reader, onProgress func(float64)) error
PushDigest implements DigestPusher.
func (*DirectoryHandler) PushImage ¶ added in v0.6.4
func (handle *DirectoryHandler) PushImage(ctx context.Context, ref string, target *ocispec.Descriptor) error
PushImage implements ImagePusher.
func (*DirectoryHandler) ResolveImage ¶ added in v0.6.4
func (handle *DirectoryHandler) ResolveImage(ctx context.Context, fullref string) (imgspec ocispec.Image, err error)
ResolveImage implements ImageResolver.
func (*DirectoryHandler) UnpackImage ¶ added in v0.6.4
func (handle *DirectoryHandler) UnpackImage(ctx context.Context, ref string, dest string) (err error)
UnpackImage implements ImageUnpacker.
type Handler ¶
type Handler interface { DigestResolver DigestPusher ManifestLister ImagePusher ImageResolver ImageFetcher ImageUnpacker }