package unpack
import "github.com/containerd/containerd/pkg/unpack"
Index ¶
- type Platform
- type Result
- type Unpacker
- func NewUnpacker(ctx context.Context, cs content.Store, opts ...UnpackerOpt) (*Unpacker, error)
- func (u *Unpacker) Unpack(h images.Handler) images.Handler
- func (u *Unpacker) Wait() (Result, error)
- type UnpackerOpt
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 ¶
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 ¶
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 ¶
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
Source Files ¶
- Version
- v1.7.27 (latest)
- Published
- Mar 17, 2025
- Platform
- linux/amd64
- Imports
- 27 packages
- Last checked
- 16 hours ago –
Tools for package owners.