local

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ActiveJobs

type ActiveJobs interface {
	Status(string) (content.Status, bool)
}

type ProgressTracker

type ProgressTracker struct {
	// contains filtered or unexported fields
}

func NewProgressTracker

func NewProgressTracker(root, transferState string) *ProgressTracker

NewProgressTracker tracks content download progress

func (*ProgressTracker) Add

func (j *ProgressTracker) Add(desc ocispec.Descriptor)

Add adds a descriptor to be tracked

func (*ProgressTracker) AddChildren

func (j *ProgressTracker) AddChildren(desc ocispec.Descriptor, children []ocispec.Descriptor)

Adds hierarchy information

func (*ProgressTracker) HandleProgress

func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.ProgressFunc, pt StatusTracker)

func (*ProgressTracker) MarkExists

func (j *ProgressTracker) MarkExists(desc ocispec.Descriptor)

func (*ProgressTracker) Wait

func (j *ProgressTracker) Wait()

type StatusTracker

type StatusTracker interface {
	Active(context.Context, ...string) (ActiveJobs, error)
	Check(context.Context, digest.Digest) (bool, error)
}

func NewContentStatusTracker

func NewContentStatusTracker(cs content.Store) StatusTracker

type TransferConfig

type TransferConfig struct {
	// MaxConcurrentDownloads is the max concurrent content downloads for pull.
	MaxConcurrentDownloads int
	// MaxConcurrentUploadedLayers is the max concurrent uploads for push
	MaxConcurrentUploadedLayers int

	// DuplicationSuppressor is used to make sure that there is only one
	// in-flight fetch request or unpack handler for a given descriptor's
	// digest or chain ID.
	DuplicationSuppressor kmutex.KeyedLocker

	// BaseHandlers are a set of handlers which get are called on dispatch.
	// These handlers always get called before any operation specific
	// handlers.
	BaseHandlers []images.Handler

	// UnpackPlatforms are used to specify supported combination of platforms and snapshotters
	UnpackPlatforms []unpack.Platform

	// RegistryConfigPath is a path to the root directory containing registry-specific configurations
	RegistryConfigPath string
}

Jump to

Keyboard shortcuts

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