handler

package
v0.5.0-115-g8d4f1a1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

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

View Source
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, namespace string, 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

func (handle *ContainerdHandler) FinalizeImage(ctx context.Context, image ocispec.Image) error

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, image ocispec.Image, reader io.Reader, onProgress func(float64)) 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 DescriptorResolver interface {
	ResolveDescriptor(context.Context, string) (ocispec.Descriptor, error)
}

type DigestPusher

type DigestPusher interface {
	PushDigest(context.Context, string, ocispec.Descriptor, io.Reader, func(float64)) error
}

type DigestResolver

type DigestResolver interface {
	DigestExists(context.Context, digest.Digest) (bool, error)
}

type ImageFetcher

type ImageFetcher interface {
	FetchImage(context.Context, string, func(float64)) error
}

type ImageResolver

type ImageResolver interface {
	ResolveImage(context.Context, string) (ocispec.Image, error)
}

type ImageUnpacker

type ImageUnpacker interface {
	UnpackImage(context.Context, string, string) error
}

type ManifestLister

type ManifestLister interface {
	ListManifests(context.Context) ([]ocispec.Manifest, error)
}

Jump to

Keyboard shortcuts

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