Documentation
¶
Overview ¶
Package runtimefs archives the filesystem trees a process snapshot depends on: /workspace (compile and JIT caches, mapped .so files), /tmp and /dev/shm (what the engine wrote after the image), taken after the CRIU dump so the link_remap files CRIU leaves next to deleted-but-open files are ordinary members. A PAX tar carries the data; a JSON manifest carries what tar cannot: unix sockets (CRIU recreates them), xattrs and per-file digests.
Index ¶
Constants ¶
const ( TypeDir = "directory" TypeFile = "file" TypeHardlink = "hardlink" TypeSymlink = "symlink" TypeFifo = "fifo" TypeSocket = "socket" )
Entry types.
const Mark = ".warmctl-receiver"
Mark is a receiver's claim on a tree's directory: written before the install, it is the one entry Install accepts in its destination, and it tells a later restore in the same place that what the directory holds is a restore's, not someone's data on a volume.
const MaxEntries = 262144
MaxEntries bounds one tree.
const Schema = "warmctl.runtimefs/v2"
Schema identifies a runtimefs manifest.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Path string `json:"path"`
Type string `json:"type"`
Link string `json:"link,omitempty"`
Size int64 `json:"size,omitempty"`
SHA256 string `json:"sha256,omitempty"`
Mode uint32 `json:"mode"`
UID uint32 `json:"uid"`
GID uint32 `json:"gid"`
Mtime int64 `json:"mtime_ns"`
Xattrs map[string][]byte `json:"xattrs,omitempty"`
}
Entry is one member of the tree.
type Manifest ¶
type Manifest struct {
Schema string `json:"schema"`
Root string `json:"root"`
Entries []Entry `json:"entries"`
}
Manifest describes one archived tree and where it lives in the container.
func Snapshot ¶
Snapshot archives source into a new tar at archive and returns the manifest, with root as the tree's path inside the container.