Skip to main content

Module workspace

Module workspace 

Source
Expand description

Directory transfer: the manifest, the diff and the sync pass, over the real filesystem’s walk, hash, pack and guarded extraction (#260).

Structs§

Artifact
One member LocalTree::extract wrote.
Delta
What an incremental sync has to do.
DiskTree
The real filesystem as a LocalTree.
Manifest
What one sync left in the guest: every member’s identity, keyed by relative path.
Packed
A packed archive and how many members it holds.
SyncPass
What one sync pass did.
WorkspaceError
A local tree that couldn’t be packed, hashed or written to.

Constants§

DEFAULT_SYNC_DELETE_TIMEOUT
The in-guest rm’s timeout_sec when a caller names none: microvm sync --timeout‘s default, and the bindings’ sync_dir’s.
MANIFEST_NAME
The manifest’s member name relative to the workspace. It never travels and never appears in a Delta, so the manifest can’t order its own deletion.
MANIFEST_PATH
Where the incremental manifest lives in the guest: inside the workspace, deliberately.
MANIFEST_VERSION
The manifest format this build writes.
MAX_PACK_BYTES
The pack’s byte budget: the daemon’s max_body_bytes (512 MiB), checked on file sizes during the walk, so an over-budget tree is refused before its archive is allocated.
MAX_PACK_MEMBERS
The pack’s member budget: the daemon’s max_tar_members.
REMOTE_WORKDIR
Where a synced tree lands in the guest, and the working directory of what runs in it.
SKIPPED_DIRS
Directory names never packed or hashed, whole.
SYNC_DELETE_GRACE
How long past the in-guest rm’s own timeout_sec a sync pass waits for its answer.

Traits§

LocalTree
A local directory tree, packed, hashed and written to: the port microvms-edges implements over the real filesystem.

Functions§

check_glob
Whether glob is a pattern LocalTree::extract can match with, and why not when it isn’t: the one glob grammar, for a caller that validates globs before a run needs them.
deletable
Whether a deletion path from the guest manifest is safe to hand to an in-guest rm.
diff
What changed between the tree as it is (local) and as the last sync left it (remote).
within_byte_budget
Whether a walk’s running byte total is still within MAX_PACK_BYTES: at the budget is within it, one byte past isn’t.
within_member_budget
Whether a walk’s running member count is still within MAX_PACK_MEMBERS.