package rootfs
import "github.com/containerd/containerd/rootfs"
Index ¶
- func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, sn snapshots.Snapshotter, a diff.Applier, opts ...snapshots.Opt) (bool, error)
- func ApplyLayerWithOpts(ctx context.Context, layer Layer, chain []digest.Digest, sn snapshots.Snapshotter, a diff.Applier, opts []snapshots.Opt, applyOpts []diff.ApplyOpt) (bool, error)
- func ApplyLayers(ctx context.Context, layers []Layer, sn snapshots.Snapshotter, a diff.Applier) (digest.Digest, error)
- func ApplyLayersWithOpts(ctx context.Context, layers []Layer, sn snapshots.Snapshotter, a diff.Applier, applyOpts []diff.ApplyOpt) (digest.Digest, error)
- func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter, d diff.Comparer, opts ...diff.Opt) (ocispec.Descriptor, error)
- func InitRootFS(ctx context.Context, name string, parent digest.Digest, readonly bool, snapshotter snapshots.Snapshotter, mounter Mounter) ([]mount.Mount, error)
- type Layer
- type Mounter
Functions ¶
func ApplyLayer ¶
func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, sn snapshots.Snapshotter, a diff.Applier, opts ...snapshots.Opt) (bool, error)
ApplyLayer applies a single layer on top of the given provided layer chain, using the provided snapshotter and applier. If the layer was unpacked true is returned, if the layer already exists false is returned.
func ApplyLayerWithOpts ¶
func ApplyLayerWithOpts(ctx context.Context, layer Layer, chain []digest.Digest, sn snapshots.Snapshotter, a diff.Applier, opts []snapshots.Opt, applyOpts []diff.ApplyOpt) (bool, error)
ApplyLayerWithOpts applies a single layer on top of the given provided layer chain, using the provided snapshotter, applier, and apply opts. If the layer was unpacked true is returned, if the layer already exists false is returned.
func ApplyLayers ¶
func ApplyLayers(ctx context.Context, layers []Layer, sn snapshots.Snapshotter, a diff.Applier) (digest.Digest, error)
ApplyLayers applies all the layers using the given snapshotter and applier. The returned result is a chain id digest representing all the applied layers. Layers are applied in order they are given, making the first layer the bottom-most layer in the layer chain.
func ApplyLayersWithOpts ¶
func ApplyLayersWithOpts(ctx context.Context, layers []Layer, sn snapshots.Snapshotter, a diff.Applier, applyOpts []diff.ApplyOpt) (digest.Digest, error)
ApplyLayersWithOpts applies all the layers using the given snapshotter, applier, and apply opts. The returned result is a chain id digest representing all the applied layers. Layers are applied in order they are given, making the first layer the bottom-most layer in the layer chain.
func CreateDiff ¶
func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter, d diff.Comparer, opts ...diff.Opt) (ocispec.Descriptor, error)
CreateDiff creates a layer diff for the given snapshot identifier from the parent of the snapshot. A content ref is provided to track the progress of the content creation and the provided snapshotter and mount differ are used for calculating the diff. The descriptor for the layer diff is returned.
func InitRootFS ¶
func InitRootFS(ctx context.Context, name string, parent digest.Digest, readonly bool, snapshotter snapshots.Snapshotter, mounter Mounter) ([]mount.Mount, error)
InitRootFS initializes the snapshot for use as a rootfs
Types ¶
type Layer ¶
type Layer struct { Diff ocispec.Descriptor Blob ocispec.Descriptor }
Layer represents the descriptors for a layer diff. These descriptions include the descriptor for the uncompressed tar diff as well as a blob used to transport that tar. The blob descriptor may or may not describe a compressed object.
type Mounter ¶
type Mounter interface { Mount(target string, mounts ...mount.Mount) error Unmount(target string) error }
Mounter handles mount and unmount
Source Files ¶
apply.go diff.go init.go init_other.go
- Version
- v1.6.33
- Published
- Jun 5, 2024
- Platform
- js/wasm
- Imports
- 16 packages
- Last checked
- 3 minutes ago –
Tools for package owners.