Documentation
¶
Overview ¶
Package helper serves hack/hyperlight/PROTOCOL.md without a hypervisor, each fiber a goroutine and each park a JSON file. The fakehelper binary runs it as a process, and the backend's unit tests run it as a goroutine, so everything it starts ends when Serve returns. It logs every command as the Rust helper does, the seed and the payload by size alone. A sandbox reaches the grant's device engine only through its engine method, which puts the sandbox's own fence in every line, as the Rust helper's Engine host function does.
Index ¶
Constants ¶
const Facts = "fakehelper/4 none none none"
Facts mirrors the Rust helper's snapshot facts (helper, hyperlight_host, hypervisor, cpu). The fake has none of the last three.
const SeedBytes = 32
SeedBytes is the seed every CLONE and RESUME carries, as hex.
const Version = Facts + "\ntemplate-dir"
Version is what `fakehelper --version` prints: the facts, then the line that advertises it restores a template's snapshot given as --template-dir (hack/hyperlight/PROTOCOL.md).
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
Serve says READY on ctl and answers commands until ctl's read side ends, logging each one on log (the helper's stderr, which fiberd points at the grant's zygote.log). engine is the grant's engine socket, "" when it has none. Every sandbox, endpoint and goroutine is gone when it returns.