Documentation
¶
Overview ¶
Package overlaybd implements the ACR Artifact Streaming compatibility contract currently consumed by the OverlayBD snapshotter.
Index ¶
- Constants
- Variables
- type BlockMounter
- type LSMTImage
- type LSMTLayer
- type Layer
- type Manifest
- type Mapping
- type NBDDevice
- type NBDMounter
- type RangeReader
- type RemoteLayer
- type Snapshotter
- func (s *Snapshotter) Cleanup(ctx context.Context) error
- func (s *Snapshotter) Close() error
- func (s *Snapshotter) Commit(ctx context.Context, name, key string, opts ...snapshots.Opt) error
- func (s *Snapshotter) Mounts(ctx context.Context, key string) ([]mount.Mount, error)
- func (s *Snapshotter) Prepare(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)
- func (s *Snapshotter) Remove(ctx context.Context, key string) error
- func (s *Snapshotter) Stat(ctx context.Context, key string) (info snapshots.Info, err error)
- func (s *Snapshotter) Update(ctx context.Context, info snapshots.Info, fieldpaths ...string) (updated snapshots.Info, err error)
- func (s *Snapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, error)
- func (s *Snapshotter) View(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)
- func (s *Snapshotter) Walk(ctx context.Context, walk snapshots.WalkFunc, filters ...string) error
Constants ¶
const ( AnnotationBlobDigest = "containerd.io/snapshot/overlaybd/blob-digest" AnnotationBlobSize = "containerd.io/snapshot/overlaybd/blob-size" AnnotationBlobFSType = "containerd.io/snapshot/overlaybd/blob-fs-type" AnnotationVersion = "containerd.io/snapshot/overlaybd/version" VersionV1 = "0.1.0" )
Variables ¶
var ErrNotArtifactStreaming = errors.New("not an ACR OverlayBD streaming manifest")
Functions ¶
This section is empty.
Types ¶
type BlockMounter ¶
type BlockMounter interface {
Mount(context.Context, string, []RemoteLayer, string) (io.Closer, error)
}
BlockMounter exposes a bottom-to-top remote layer chain as one mounted read-only filesystem. Closing the result tears down the mount and device.
type LSMTImage ¶
type LSMTImage struct {
// contains filtered or unexported fields
}
LSMTImage overlays ACR layers in manifest order. Later layers have higher precedence, matching OverlayBD's open_files_ro behavior.
func NewLSMTImage ¶
type LSMTLayer ¶
type LSMTLayer struct {
// contains filtered or unexported fields
}
LSMTLayer is one validated read-only OverlayBD v0.1.0 layer.
type Layer ¶
type Layer struct {
DescriptorDigest digest.Digest
DataDigest digest.Digest
Size int64
FSType string
Version string
}
Layer is one immutable ACR-produced OverlayBD lower, in manifest order.
type Manifest ¶
Manifest is the validated subset of the ACR Artifact Streaming contract needed to construct a read-only snapshot.
func ParseManifest ¶
ParseManifest validates the current ACR OverlayBD descriptor contract. Missing optional version and filesystem annotations retain the snapshotter's existing defaults; malformed or partially annotated manifests fail closed.
type NBDDevice ¶
type NBDDevice struct {
// contains filtered or unexported fields
}
NBDDevice exposes a read-only virtual disk through a Linux NBD device.
type NBDMounter ¶
type NBDMounter struct {
// contains filtered or unexported fields
}
NBDMounter mounts stacked LSMT images through a pool of Linux NBD devices.
func NewNBDMounter ¶
type RangeReader ¶
type RangeReader struct {
// contains filtered or unexported fields
}
RangeReader exposes one immutable ACR OverlayBD blob through Gantry's node-local exact-range endpoint.
func NewRangeReader ¶
NewRangeReader validates the local Gantry endpoint and immutable origin URL.
func (*RangeReader) ReadAtContext ¶
ReadAtContext reads one exact range and validates Gantry's response framing.
func (*RangeReader) Size ¶
func (r *RangeReader) Size() int64
Size returns the immutable remote object size.
type RemoteLayer ¶
RemoteLayer describes one ACR-produced OverlayBD layer in manifest order.
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
Snapshotter implements the containerd remote snapshot protocol for the existing ACR OverlayBD v0.1.0 contract.
func NewSnapshotter ¶
func NewSnapshotter(root string, mounter BlockMounter) (*Snapshotter, error)
func NewSnapshotterWithFallback ¶
func NewSnapshotterWithFallback(root string, mounter BlockMounter, fallback snapshots.Snapshotter) (*Snapshotter, error)
func (*Snapshotter) Close ¶
func (s *Snapshotter) Close() error