snapshot

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainerdSnapshotter

func NewContainerdSnapshotter(s Snapshotter) (snapshots.Snapshotter, func() error)

NewContainerdSnapshotter converts snapshotter to containerd snapshotter

Types

type Blobmapper

type Blobmapper interface {
	GetBlob(ctx context.Context, key string) (digest.Digest, digest.Digest, error)
	SetBlob(ctx context.Context, key string, diffID, blob digest.Digest) error
}

type Mountable

type Mountable interface {
	// ID() string
	Mount() ([]mount.Mount, error)
	Release() error
}

type Mounter

type Mounter interface {
	Mount() (string, error)
	Unmount() error
}

func LocalMounter

func LocalMounter(mountable Mountable) Mounter

LocalMounter is a helper for mounting mountfactory to temporary path. In addition it can mount binds without privileges

func LocalMounterWithMounts

func LocalMounterWithMounts(mounts []mount.Mount) Mounter

LocalMounterWithMounts is a helper for mounting to temporary path. In addition it can mount binds without privileges

type Snapshotter

type Snapshotter interface {
	Blobmapper
	SnapshotterBase
}

Snapshotter defines interface that any snapshot implementation should satisfy

type SnapshotterBase

type SnapshotterBase interface {
	Mounts(ctx context.Context, key string) (Mountable, error)
	Prepare(ctx context.Context, key, parent string, opts ...snapshots.Opt) error
	View(ctx context.Context, key, parent string, opts ...snapshots.Opt) (Mountable, error)

	Stat(ctx context.Context, key string) (snapshots.Info, error)
	Update(ctx context.Context, info snapshots.Info, fieldpaths ...string) (snapshots.Info, error)
	Usage(ctx context.Context, key string) (snapshots.Usage, error)
	Commit(ctx context.Context, name, key string, opts ...snapshots.Opt) error
	Remove(ctx context.Context, key string) error
	Walk(ctx context.Context, fn func(context.Context, snapshots.Info) error) error
	Close() error
}

func FromContainerdSnapshotter

func FromContainerdSnapshotter(s snapshots.Snapshotter) SnapshotterBase

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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