Versions in this module Expand all Collapse all v0 v0.1.7 Dec 2, 2026 v0.1.6 Dec 1, 2026 v0.1.5 Nov 17, 2026 v0.1.4 Nov 3, 2026 v0.1.3 Nov 2, 2026 v0.1.2 Oct 30, 2026 v0.1.1 Oct 29, 2026 v0.1.0 Oct 26, 2026 Changes in this version + const MarkBegin + const MarkBoot + const MarkExit + const MarkLost + const MarkSetupFailed + const MaxBootPayload + const ProvisionExitInfra + const ProvisionExitRepo + const ProvisionMarkerName + const SSHDSnippetText — linux/amd64 + const SelfTestMarker — linux/amd64 + const SudoersText — linux/amd64 + const VerdictNoEgress — linux/amd64 + const VerdictNoFirewall — linux/amd64 + var ErrBadArg = errors.New("bad argument") + var ErrNotFound = errors.New("not found") + var ErrOffset = errors.New("offset beyond the end") + var ErrTooLarge = errors.New("payload over 8 MiB") + var ErrTruncated = errors.New("truncated payload") + var ResultFiles = map[string]bool — linux/amd64 + func CanonNft(j []byte) (string, error) — linux/amd64 + func EvalSelfTest(spec SelfTestSpec, res NetProbeResult) (lines, verdicts []string) — linux/amd64 + func ExecVerb(args []string, stdout io.Writer, stderr io.Writer) int — linux/amd64 + func FormatMarker(kind, nonce string, arg ...string) string + func InstallJobSeccomp() error — linux/amd64 + func JobSeccompProgram(goarch string) ([]unix.SockFilter, error) — linux/amd64 + func List(root string, w io.Writer) error — linux/amd64 + func Main(_ []string, _ io.Writer) int — darwin/amd64, js/wasm, windows/amd64 + func Main(args []string, stdout io.Writer) int — linux/amd64 + func MainIO(args []string, stdin io.Reader, stdout io.Writer) int — linux/amd64 + func NewServer(dir string, bearer []byte) (http.Handler, error) — linux/amd64 + func NftTemplate() string — linux/amd64 + func PackArtifacts(workdir string, paths []string, w io.Writer) error — linux/amd64 + func ParseSlots(s string) ([]int, bool) — linux/amd64 + func Provision(o ProvisionOptions, ps ProvisionSpec) int — linux/amd64 + func ReadFile(root, job, file string, off int64, w io.Writer) error — linux/amd64 + func RenderNft(c HostConf, uids []int) (string, error) — linux/amd64 + func Run(ctx context.Context, o Options, s Spec, sec Secrets) int — linux/amd64 + func RunFirewallSelfTest(e HostEnv, spec SelfTestSpec, out io.Writer) int — linux/amd64 + func RunSlot(env SlotRunEnv, slots []int, name, nonce string, stdin io.Reader, ...) int — linux/amd64 + func SelfTestFailed(root string) bool — linux/amd64 + func Stub(url, sum string) string + func StubBuild(cloneURL, ref, commit, sum string) string + func StubInstall(url, sum string) string + func Tail(ctx context.Context, root, job string, o TailOptions, w io.Writer) error — linux/amd64 + func Teardown(root, job string, w io.Writer) error — linux/amd64 + func ValidateAllowTarget(v string, testTargets bool) error — linux/amd64 + type BootPayload struct + APIBase string + Code *CodeUpload + Deadline int64 + DeployKey string + KeepAlive *KeepAlive + Provider string + ResourceID string + ResultsRoot string + ScopedKey string + Spec string + func ReadBootPayload(r io.Reader) (BootPayload, error) + func (p BootPayload) Frame() ([]byte, error) + func (p BootPayload) WithoutKey() (BootPayload, string) + type BusyError struct — linux/amd64 + Slot int + func (e *BusyError) Error() string + type CodeUpload struct + Kind string + Len int64 + Ref string + SHA256 string + type ConnResult int — linux/amd64 + const ConnBlocked + const ConnOpen + const ConnRefused + type Duration time.Duration + func (d *Duration) UnmarshalJSON(b []byte) error + func (d Duration) MarshalJSON() ([]byte, error) + type Finding struct — linux/amd64 + ID string + Level string + Msg string + func CheckHost(e HostEnv) []Finding + func GitItems(e HostEnv) []Finding + func (f Finding) String() string + type Frame struct + Alive *bool + Data []byte + Done bool + File string + HB bool + Off int64 + type HostConf struct — linux/amd64 + Gateway string + MaxBundle int64 + MemoryPerSlot int64 + Netns bool + Resolver string + SecretPaths []string + Slots int + func ParseHostConf(b []byte) (HostConf, error) + func (c HostConf) BundleCap() int64 + type HostEnv struct — linux/amd64 + Conf HostConf + Doctor bool + Environ func() []string + Exec func(stdin, name string, args ...string) ([]byte, error) + LoginProbe func() (int, error) + NetProbe func(targets []string) (NetProbeResult, error) + OpenAs func(uid, gid int, path string) error + Owner func(fi os.FileInfo) (uid, gid int) + Root string + SeccompProbe func() ([]string, error) + Self string + func NewHostEnv(conf HostConf, doctor bool) HostEnv + func NewHostEnvFor(conf HostConf, doctor bool, self string) HostEnv + type JobNS struct — linux/amd64 + func StartJobNS(c JobNSConf) (*JobNS, error) + func (n *JobNS) Close() + func (n *JobNS) Wrap(c *exec.Cmd) error + type JobNSConf struct — linux/amd64 + Conf HostConf + Gid int + Probe bool + Self string + Slot int + ToolsDir string + Uid int + type KeepAlive struct + Expire Duration + Renew Duration + type KeepAliveConf struct — linux/amd64 + Expire time.Duration + Renew time.Duration + Sock string + type Marker struct + Arg string + Class string + Kind string + Line string + func ParseMarker(line, nonce string) (Marker, bool) + type NetProbeResult struct — linux/amd64 + Connect map[string]ConnResult + DNSErr error + type NotLeasedError struct — linux/amd64 + Name string + Slot int + func (e *NotLeasedError) Error() string + type Options struct — linux/amd64 + AfterCommand func() + Code *CodeUpload + CodeTimeout time.Duration + Deadline time.Time + HTTP *http.Client + HostCheck func() error + KeepAlive *KeepAliveConf + KeyRoot string + Listener net.Listener + NoServe bool + ResultsRoot string + SelfDelete func(ctx context.Context) error + SelfSHA func() (string, error) + StateRoot string + Stdout io.Writer + System System + ToolsRoot string + Upload UploadEnv + UploadLock string + WorkRoot string + type PlainSystem struct — linux/amd64 + func (PlainSystem) Chown(string, int, int) error + func (PlainSystem) Cmd(argv []string, _ bool, _, _ int) *exec.Cmd + func (PlainSystem) EnsureJobUser() (int, int, string, error) + func (PlainSystem) InstallPackages([]string) error + func (PlainSystem) MountTmpfs(string) (func() error, error) + func (PlainSystem) SetOOMScoreAdj() error + type ProvisionMarker struct + AgentSHA256 string + Packages []string + Tools []Tool + type ProvisionOptions struct — linux/amd64 + HTTP *http.Client + SelfSHA func() (string, error) + StateRoot string + Stdout io.Writer + System System + ToolsRoot string + type ProvisionSpec struct + Packages []string + TestRoot string + Tools []Tool + Unprivileged bool + func ReadProvisionSpec(r io.Reader) (ProvisionSpec, error) + func (p ProvisionSpec) Frame() ([]byte, error) + type RealSlotSys struct — linux/amd64 + Log io.Writer + func (RealSlotSys) KillSlot(slot, uid int) error + func (RealSlotSys) Recreate(slot, uid, gid int) error + func (RealSlotSys) RemoveIPC(uid int) error + func (RealSlotSys) RemoveStray(slot, uid int) (int, error) + func (RealSlotSys) UID(slot int) (int, int, error) + func (RealSlotSys) UnmountKey(slot int) error + func (r RealSlotSys) ClearScheduling(slot, uid int) error + func (r RealSlotSys) DropNet(slot int) error + type RealSystem struct — linux/amd64 + func (RealSystem) Chown(path string, uid, gid int) error + func (RealSystem) Cmd(argv []string, asRoot bool, uid, gid int) *exec.Cmd + func (RealSystem) EnsureJobUser() (int, int, string, error) + func (RealSystem) InstallPackages(names []string) error + func (RealSystem) MountTmpfs(dir string) (func() error, error) + func (RealSystem) SetOOMScoreAdj() error + type ResultFile struct + ArtifactsSHA256 string + ErrBytes int64 + ErrSHA256 string + Exit int + MAC string + OutBytes int64 + OutSHA256 string + func Sign(k []byte, r ResultFile) ResultFile + func VerifyResult(k []byte, raw []byte) (ResultFile, error) + type Results struct — linux/amd64 + Dir string + func NewResults(root, job string) (*Results, error) + func (r *Results) Bind(k []byte, job, nonce string) + func (r *Results) Commit(name string) error + func (r *Results) Create(name string) (*os.File, error) + func (r *Results) Finish(k []byte, exit int, workdir string, artifacts []string) (ResultFile, error) + func (r *Results) WriteState(phase string, exit *int) error + type Secrets struct — linux/amd64 + DeployKey string + type SelfTestSpec struct — linux/amd64 + Allow []string + Block []string + func DefaultSelfTestSpec(conf HostConf, router, controller string, allow []string) SelfTestSpec + type Service struct + Argv []string + Name string + Ready []string + ReadyTimeout Duration + RunAs string + type SlotHost struct — linux/amd64 + Conf HostConf + Log io.Writer + Now func() time.Time + Root string + Sys SlotSys + func (h *SlotHost) Handoff(slots []int, name, nonce string, ...) error + func (h *SlotHost) Owners() (map[int]*SlotOwner, error) + func (h *SlotHost) Prepare(slots []int, name, nonce, tag string, lease time.Duration) error + func (h *SlotHost) ReceiveUpload(env UploadEnv, slots []int, c CodeUpload, deadline time.Time, src io.Reader) (err error) + func (h *SlotHost) Release(slots []int, name string) error + func (h *SlotHost) ResultsDir() string + func (h *SlotHost) StateDir() string + func (h *SlotHost) Teardown(slots []int, name string) (string, error) + type SlotOwner struct — linux/amd64 + Created int64 + Job string + LeaseUntil int64 + Name string + Nonce string + Tag string + type SlotRunEnv struct — linux/amd64 + Host *SlotHost + Start func(p BootPayload, key string) error + Upload UploadEnv + type SlotSys interface — linux/amd64 + ClearScheduling func(slot, uid int) error + DropNet func(slot int) error + KillSlot func(slot, uid int) error + Recreate func(slot, uid, gid int) error + RemoveIPC func(uid int) error + RemoveStray func(slot, uid int) (int, error) + UID func(slot int) (uid, gid int, err error) + UnmountKey func(slot int) error + type SlotSystem struct — linux/amd64 + Conf HostConf + Self string + Slots []int + Sys RealSlotSys + ToolsDir string + func (s *SlotSystem) Chown(path string, uid, gid int) error + func (s *SlotSystem) Close() + func (s *SlotSystem) Cmd(argv []string, asRoot bool, uid, gid int) *exec.Cmd + func (s *SlotSystem) EnsureJobUser() (int, int, string, error) + func (s *SlotSystem) FinishCmd(c *exec.Cmd) + func (s *SlotSystem) InstallPackages(names []string) error + func (s *SlotSystem) MountTmpfs(dir string) (func() error, error) + func (s *SlotSystem) Reap() + func (s *SlotSystem) SetOOMScoreAdj() error + type Spec struct + Argv []string + Artifacts []string + Bearer string + CloneURL string + Cwd string + Env []string + Job string + KnownHosts string + MacKey string + Nonce string + Packages []string + Pool string + Port int + Ref string + RootSteps bool + Services []Service + Setup []Step + Sha string + TestRoot string + Timeout Duration + Tools []Tool + Unprivileged bool + func DecodeSpec(v string) (Spec, error) + func (s Spec) Encode() (string, error) + type State struct + Exit *int + Job string + MAC string + Nonce string + Phase string + Seq int64 + TS int64 + func SignState(k []byte, s State) State + func VerifyState(k []byte, raw []byte, job, nonce string) (State, error) + type Step struct + Argv []string + Name string + RunAs string + type System interface — linux/amd64 + Chown func(path string, uid, gid int) error + Cmd func(argv []string, asRoot bool, uid, gid int) *exec.Cmd + EnsureJobUser func() (uid, gid int, home string, err error) + InstallPackages func(names []string) error + MountTmpfs func(dir string) (unmount func() error, err error) + SetOOMScoreAdj func() error + type TailOptions struct — linux/amd64 + Heartbeat time.Duration + Offsets map[string]int64 + Poll time.Duration + type Tool struct + Name string + SHA256 string + URL string + type UploadEnv struct — linux/amd64 + Fchown func(fd, uid, gid int) error + Idle time.Duration + Now func() time.Time + Overall time.Duration + OwnerUID int + Raced func() + Statfs func(path string) (avail, filesFree uint64, err error)