unpack

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform struct {
	Platform platforms.Matcher

	SnapshotterKey string
	Snapshotter    snapshots.Snapshotter
	SnapshotOpts   []snapshots.Opt

	Applier   diff.Applier
	ApplyOpts []diff.ApplyOpt
}

Platform represents a platform-specific unpack configuration which includes the platform matcher as well as snapshotter and applier.

type Result

type Result struct {
	Unpacks int
}

Result returns information about the unpacks which were completed.

type Unpacker

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

Unpacker unpacks images by hooking into the image handler process. Unpacks happen in the backgrounds and waited on to complete.

func NewUnpacker

func NewUnpacker(ctx context.Context, cs content.Store, opts ...UnpackerOpt) (*Unpacker, error)

NewUnpacker creates a new instance of the unpacker which can be used to wrap an image handler and unpack in parallel to handling. The unpacker will handle calling the block handlers when they are needed by the unpack process.

func (*Unpacker) Unpack

func (u *Unpacker) Unpack(h images.Handler) images.Handler

Unpack wraps an image handler to filter out blob handling and scheduling them during the unpack process. When an image config is encountered, the unpack process will be started in a goroutine.

func (*Unpacker) Wait

func (u *Unpacker) Wait() (Result, error)

Wait waits for any ongoing unpack processes to complete then will return the result.

type UnpackerOpt

type UnpackerOpt func(*unpackerConfig) error

func WithDuplicationSuppressor

func WithDuplicationSuppressor(d kmutex.KeyedLocker) UnpackerOpt

func WithLimiter

func WithLimiter(l *semaphore.Weighted) UnpackerOpt

func WithUnpackPlatform

func WithUnpackPlatform(u Platform) UnpackerOpt

Jump to

Keyboard shortcuts

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