package snapshot
import "github.com/containerd/accelerated-container-image/pkg/snapshot"
Index ¶
- Constants
- func NewSnapshotter(bootConfig *BootConfig, opts ...Opt) (snapshots.Snapshotter, error)
- type BootConfig
- type Opt
- type OverlayBDBSConfig
- type OverlayBDBSConfigLower
- type OverlayBDBSConfigUpper
- type SnapshotterConfig
- type ZFileConfig
Constants ¶
const ( RoDir = "overlayfs" // overlayfs as rootfs. upper + lower (overlaybd) RwDir = "dir" // mount overlaybd as rootfs RwDev = "dev" // use overlaybd directly )
Functions ¶
func NewSnapshotter ¶
func NewSnapshotter(bootConfig *BootConfig, opts ...Opt) (snapshots.Snapshotter, error)
NewSnapshotter returns a Snapshotter which uses block device based on overlayFS.
Types ¶
type BootConfig ¶
type BootConfig struct { 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 }
func DefaultBootConfig ¶
func DefaultBootConfig() *BootConfig
type Opt ¶
type Opt func(config *SnapshotterConfig) error
Opt is an option to configure the snapshotter
type OverlayBDBSConfig ¶
type OverlayBDBSConfig struct { RepoBlobURL string `json:"repoBlobUrl"` Lowers []OverlayBDBSConfigLower `json:"lowers"` Upper OverlayBDBSConfigUpper `json:"upper"` ResultFile string `json:"resultFile"` AccelerationLayer bool `json:"accelerationLayer,omitempty"` RecordTracePath string `json:"recordTracePath,omitempty"` }
OverlayBDBSConfig is the config of overlaybd target.
type OverlayBDBSConfigLower ¶
type OverlayBDBSConfigLower struct { GzipIndex string `json:"gzipIndex,omitempty"` File string `json:"file,omitempty"` Digest string `json:"digest,omitempty"` TargetFile string `json:"targetFile,omitempty"` TargetDigest string `json:"targetDigest,omitempty"` Size int64 `json:"size,omitempty"` Dir string `json:"dir,omitempty"` }
OverlayBDBSConfigLower
type OverlayBDBSConfigUpper ¶
type OverlayBDBSConfigUpper struct { Index string `json:"index,omitempty"` Data string `json:"data,omitempty"` Target string `json:"target,omitempty"` GzipIndex string `json:"gzipIndex,omitempty"` }
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 ¶
Source Files ¶
- Version
- v1.0.0
- Published
- Oct 13, 2023
- Platform
- js/wasm
- Imports
- 33 packages
- Last checked
- 2 hours ago –
Tools for package owners.