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.
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 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 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" )
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 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 Handler ¶
type Handler interface { DigestResolver DigestPusher ManifestLister ImagePusher ImageResolver ImageFetcher ImageUnpacker }