snapshots

package
v0.0.0-...-4b51ba2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(ctx context.Context, client *containerd.Client, snapshotter snapshots.Snapshotter, parentKey, committedKey string) (ocispec.Descriptor, error)

Types

type Committer

type Committer struct {
	ActiveSnapshotKey string
	MountPoint        string
}

func Prepare

func Prepare(ctx context.Context, snapshotter snapshots.Snapshotter, parentSnapshotKey, mountPoint string) (*Committer, error)

Prepare will mount all layers of the parentSnapshotKey ont mountPoint. Once mounted, the caller can read and write files in the mountPoint.

Use the returned "Committer" to unmount and commit your file changes.

HINT: Mount points could be temporary directories if you want.

NOTE: containerd uses the term "target" to refer to the mount point.

func (*Committer) Commit

func (c *Committer) Commit(ctx context.Context, snapshotter snapshots.Snapshotter, committedKey string) error

func (*Committer) Unmount

func (c *Committer) Unmount() error

Jump to

Keyboard shortcuts

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