probe

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package probe checks at startup which volume modes a host accepts. The result is given to every microvm provider, which advertises it as the capabilities volume-overlay and volume-full.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, probes Probes) models.Capabilities

Run runs the probes and returns the volume capabilities the host has. Every probe that fails is logged with its reason.

Types

type Probes

type Probes struct {
	// Reflink checks that FICLONE works in the state directory.
	Reflink func(ctx context.Context) error
	// MkfsErofs checks that the pinned mkfs.erofs is present and reports
	// the version of the base profile.
	MkfsErofs func(ctx context.Context) error
	// MkfsExt4 checks that mkfs.ext4 is present.
	MkfsExt4 func(ctx context.Context) error
	// Snapshotter checks that containerd loaded the volume snapshotter.
	Snapshotter func(ctx context.Context) error
}

Probes are the checks of one host. Each returns nil when the host passes. volume-overlay needs Reflink, MkfsErofs and MkfsExt4. volume-full needs Snapshotter.

func Host

func Host(stateDir, mkfsErofsPath string, cfg *containerd.Config, client containerd.Client) Probes

Host returns the probes of this host. The reflink probe runs in stateDir and creates it when needed. The snapshotter probe asks containerd through client about the snapshotter named in cfg.

Jump to

Keyboard shortcuts

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