admission

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package admission is CTO's side of cto.admission/v1: it runs a consumer's selected runner, reads the sandbox report the runner sends before it executes guest code, decides with sandbox.Admit and approves or refuses. The consumer states what it accepts; it never reads the report before execution. See docs/adr-sandboxing.md, section 9.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnavailable: the runner did not get as far as a usable report (it could not start,
	// exited, or failed before admission). Its diagnostics are in the message.
	ErrUnavailable = errors.New("unavailable")
	// ErrTimeout: TimeoutMs ended the run before the runner was admitted.
	ErrTimeout = errors.New("timeout")
	// ErrCanceled: the caller canceled the run before the runner was admitted.
	ErrCanceled = errors.New("canceled")
)

Functions

func Code

func Code(err error) string

Code returns the stable code of an error from Run: a sandbox code (invalid, denied, unsupported), unavailable, timeout or canceled.

func Run

Run runs request's command under admission. It returns the admitted report and the command's result, or an error whose Code says why nothing ran: no guest code runs unless Admit accepts the report. After approval the command's own failure is a result, not an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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