Documentation ¶
Index ¶
- func AllowInvalidMountsOnRestart(config *SnapshotterConfig) error
- func AsynchronousRemove(config *SnapshotterConfig) error
- func NewSnapshotter(ctx context.Context, root string, targetFs FileSystem, opts ...Opt) (snapshots.Snapshotter, error)
- func NoRestore(config *SnapshotterConfig) error
- type FileSystem
- type Opt
- type SnapshotterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowInvalidMountsOnRestart ¶ added in v0.12.1
func AllowInvalidMountsOnRestart(config *SnapshotterConfig) error
func AsynchronousRemove ¶
func AsynchronousRemove(config *SnapshotterConfig) error
AsynchronousRemove defers removal of filesystem content until the Cleanup method is called. Removals will make the snapshot referred to by the key unavailable and make the key immediately available for re-use.
func NewSnapshotter ¶
func NewSnapshotter(ctx context.Context, root string, targetFs FileSystem, opts ...Opt) (snapshots.Snapshotter, error)
NewSnapshotter returns a Snapshotter which can use unpacked remote layers as snapshots. This is implemented based on the overlayfs snapshotter, so diffs are stored under the provided root and a metadata file is stored under the root as same as overlayfs snapshotter.
func NoRestore ¶ added in v0.11.2
func NoRestore(config *SnapshotterConfig) error
Types ¶
type FileSystem ¶
type FileSystem interface { Mount(ctx context.Context, mountpoint string, labels map[string]string) error Check(ctx context.Context, mountpoint string, labels map[string]string) error Unmount(ctx context.Context, mountpoint string) error }
FileSystem is a backing filesystem abstraction.
Mount() tries to mount a remote snapshot to the specified mount point directory. If succeed, the mountpoint directory will be treated as a layer snapshot. If Mount() fails, the mountpoint directory MUST be cleaned up. Check() is called to check the connectibity of the existing layer snapshot every time the layer is used by containerd. Unmount() is called to unmount a remote snapshot from the specified mount point directory.
type Opt ¶
type Opt func(config *SnapshotterConfig) error
Opt is an option to configure the remote snapshotter
type SnapshotterConfig ¶
type SnapshotterConfig struct {
// contains filtered or unexported fields
}
SnapshotterConfig is used to configure the remote snapshotter instance