Documentation
¶
Index ¶
- Constants
- func AsynchronousRemove(config *BootConfig) error
- func AttachDevice(ctx context.Context, params *AttachDeviceParams) (devName string, e error)
- func DetachDevice(ctx context.Context, snID string, tenant int) (err error)
- func IsErofsFilesystem(path string) bool
- func IsErofsSupported() bool
- func NewSnapshotter(bootConfig *BootConfig, opts ...Opt) (snapshots.Snapshotter, error)
- type AttachDeviceParams
- type BootConfig
- type Opt
- type Registry
- type SnapshotterConfig
- type ZFileConfig
Constants ¶
View Source
const ( RoDir = "overlayfs" // overlayfs as rootfs. upper + lower (overlaybd) RwDir = "dir" // mount overlaybd as rootfs RwDev = "dev" // use overlaybd directly LayerBlob = "layer" // decompressed tgz layer (maybe compressed by ZFile) )
Variables ¶
This section is empty.
Functions ¶
func AsynchronousRemove ¶ added in v1.3.0
func AsynchronousRemove(config *BootConfig) 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 AttachDevice ¶ added in v1.4.0
func AttachDevice(ctx context.Context, params *AttachDeviceParams) (devName string, e error)
func DetachDevice ¶ added in v1.4.0
func IsErofsFilesystem ¶ added in v1.2.2
IsErofsFilesystem determines whether the block device represented by @path is eorfs filesystem.
func IsErofsSupported ¶ added in v1.2.3
func IsErofsSupported() bool
IsErofsSupported checks if EROFS fsmeta exists and is prioritized, check and modprobe erofs.
func NewSnapshotter ¶
func NewSnapshotter(bootConfig *BootConfig, opts ...Opt) (snapshots.Snapshotter, error)
NewSnapshotter returns a Snapshotter which uses block device based on overlayFS.
Types ¶
type AttachDeviceParams ¶ added in v1.4.0
type AttachDeviceParams struct {
// contains filtered or unexported fields
}
func NewAttachDeviceParams ¶ added in v1.4.0
func NewAttachDeviceParams(id string, tenant int, configPath string, resultFile string) *AttachDeviceParams
type BootConfig ¶ added in v0.6.0
type BootConfig struct {
AsyncRemove bool `json:"asyncRemove"`
Address string `json:"address"`
Root string `json:"root"`
LogLevel string `json:"verbose"`
LogReportCaller bool `json:"logReportCaller"`
RwMode string `json:"rwMode"` // overlayfs, dir or dev
AutoRemoveDev bool `json:"autoRemoveDev"`
ExporterConfig metrics.ExporterConfig `json:"exporterConfig"`
WritableLayerType string `json:"writableLayerType"` // append or sparse
MirrorRegistry []Registry `json:"mirrorRegistry"`
DefaultFsType string `json:"defaultFsType"`
RootfsQuota string `json:"rootfsQuota"` // "20g" rootfs quota, only effective when rwMode is 'overlayfs'
Tenant int `json:"tenant"` // do not set this if only a single snapshotter service in the host
TurboFsType []string `json:"turboFsType"`
}
func DefaultBootConfig ¶ added in v0.6.0
func DefaultBootConfig() *BootConfig
type Opt ¶
type Opt func(config *SnapshotterConfig) error
Opt is an option to configure the snapshotter
type SnapshotterConfig ¶
type SnapshotterConfig struct {
// OverlayBDUtilBinDir contains overlaybd-create/overlaybd-commit tools
// to handle writable device.
OverlayBDUtilBinDir string `toml:"overlaybd_util_bin_dir" json:"overlaybd_util_bin_dir"`
}
SnapshotterConfig is used to configure the snapshotter instance
type ZFileConfig ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.