Documentation ¶
Index ¶
- func ApplyLayer(ctx context.Context, layer Layer, chain []digest.Digest, ...) (bool, error)
- func ApplyLayers(ctx context.Context, layers []Layer, sn snapshots.Snapshotter, a diff.Applier) (digest.Digest, error)
- func CreateDiff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter, ...) (ocispec.Descriptor, error)
- func InitRootFS(ctx context.Context, name string, parent digest.Digest, readonly bool, ...) ([]mount.Mount, error)
- type Layer
- type Mounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 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.
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.