Versions in this module Expand all Collapse all v0 v0.1.5 Sep 16, 2026 Changes in this version type Backend + PinSandbox func(context.Context, string, bool, string, time.Time) (Sandbox, error) type Options + PinIdentities []string type Sandbox + Pinned bool + PinnedAt time.Time + PinnedBy string type Service + func (s *Service) PinSandbox(ctx context.Context, name string, pinned bool, subject string) (Sandbox, error) v0.1.4 Sep 16, 2026 v0.1.3 Sep 16, 2026 v0.1.2 Sep 16, 2026 Changes in this version type CatalogImage + Seed string type Instance + VNCURL string type Options + Mac Backend v0.1.1 Sep 15, 2026 v0.1.0 Sep 15, 2026 Changes in this version + const BaselineEgressMgmt + const BaselineEgressOOB + const WaitUntilAgent + const WaitUntilDesktop + const WaitUntilNetwork + const WaitUntilRunning + const WaitUntilStopped + var ErrNotFound = errors.New("not found") + var ErrUnavailable = errors.New("backend unavailable") + type ACLRule struct + Action string + Direction string + Dst string + ID string + Port string + Protocol string + Src string + type Backend interface + AddACLRule func(context.Context, string, string, ACLRule) (ACLRule, error) + AttachNIC func(context.Context, Ref, string, string, string, string) (NIC, error) + BeginCreateInstance func(context.Context, CreateInstance) (PendingInstance, error) + CreateForward func(context.Context, string, string, Ref, int64, int64, string) (Forward, error) + CreateNetwork func(context.Context, string, Network) (Network, error) + CreateSandbox func(context.Context, Sandbox) error + CreateSnapshot func(context.Context, Ref, string) error + DeleteFile func(context.Context, Ref, string) error + DeleteInstance func(context.Context, Ref) error + DeleteNetwork func(context.Context, string, string) error + DeleteSandbox func(context.Context, string) error + DeleteSnapshot func(context.Context, Ref, string) error + DetachNIC func(context.Context, Ref, string) error + Exec func(context.Context, ExecRequest, io.Writer, io.Writer) (int64, error) + ExtendSandbox func(context.Context, string, time.Time) (Sandbox, error) + GetInstance func(context.Context, Ref) (Instance, error) + GetNetwork func(context.Context, string, string) (Network, error) + GetSandbox func(context.Context, string) (Sandbox, error) + GetSandboxImage func(context.Context, string, string) (CatalogImage, error) + InstanceForward func(context.Context, Ref, int64, string) (Forward, error) + ListInstances func(context.Context, string) ([]Instance, error) + ListNetworks func(context.Context, string) ([]Network, error) + ListSandboxes func(context.Context) ([]Sandbox, error) + ListSnapshots func(context.Context, Ref) ([]Snapshot, error) + OpenExec func(context.Context, ExecRequest) (io.ReadWriteCloser, error) + PeerNetworks func(context.Context, string, string, string) error + PublishInstance func(context.Context, Ref, string) (string, error) + ReadBinaryFile func(context.Context, Ref, string) (io.ReadCloser, error) + ReadFile func(context.Context, FileReadRequest) (FileReadResult, error) + RemoveACLRule func(context.Context, string, string, string) error + RestartInstance func(context.Context, Ref, bool) (Instance, error) + RestoreSnapshot func(context.Context, Ref, string) error + StartInstance func(context.Context, Ref, bool) (Instance, error) + StopInstance func(context.Context, Ref, bool) (Instance, error) + WaitInstance func(context.Context, WaitRequest) (WaitResult, error) + WriteFile func(context.Context, FileWriteRequest) (FileWriteResult, error) + type Catalog struct + func LoadCatalog(path string) (*Catalog, error) + func NewCatalog(images []CatalogImage) (*Catalog, error) + func (c *Catalog) Images() []CatalogImage + func (c *Catalog) Lookup(name string) (CatalogImage, bool) + type CatalogImage struct + Alias string + CPUs int64 + Description string + Desktop bool + DiskGB int64 + Fingerprint string + Kind string + Kinds []string + MemoryMB int64 + Name string + OS string + Platform string + Reference string + Version string + type CreateInstance struct + CPUs int64 + DiskGB int64 + Host string + Image CatalogImage + Kind string + MemoryMB int64 + Network string + Ref Ref + Start bool + type ExecRequest struct + Argv []string + Cwd string + Env map[string]string + Ref Ref + Stdin string + Timeout time.Duration + User string + type ExecResult struct + ExitCode int64 + Stderr string + StderrTruncated bool + Stdout string + StdoutTruncated bool + TimedOut bool + type FileReadRequest struct + MaxBytes int64 + Path string + Ref Ref + type FileReadResult struct + Content string + Truncated bool + type FileWriteRequest struct + Content string + Mode string + Path string + Ref Ref + type FileWriteResult struct + Bytes int64 + type Forward struct + Address string + Instance string + Network string + Port int64 + Protocol string + type Impairment struct + Clear bool + JitterMS int64 + LatencyMS int64 + LossPercent float64 + RateMbit int64 + type Instance struct + CPUs int64 + Desktop bool + DiskGB int64 + Host string + Image string + Kind string + MemoryMB int64 + NICs []NIC + OS string + Ref Ref + Snapshots []string + Status string + type NIC struct + Addresses []string + GuestName string + MAC string + Name string + Network string + type Network struct + CIDR string + DHCP bool + DNS bool + Gateway string + Host string + Kind string + NAT bool + Name string + PhysicalName string + Project string + type Options struct + DefaultNetworkKind string + DefaultTTL time.Duration + DesktopReady func(context.Context, Ref) (bool, error) + Host string + Logger *slog.Logger + MaxTTL time.Duration + OnReap func() + OnSandboxExpired func(string) + type PendingInstance interface + Wait func(context.Context) (Instance, error) + type Ref struct + Name string + Sandbox string + type Sandbox struct + CreatedAt time.Time + ExpiresAt time.Time + Host string + Name string + NetworkKind string + Platform string + Subject string + type Service struct + func New(backend Backend, catalog *Catalog, opts Options) (*Service, error) + func (s *Service) AddACLRule(ctx context.Context, sandbox, network string, rule ACLRule) (ACLRule, error) + func (s *Service) AttachNIC(ctx context.Context, ref Ref, network, nic, ip, mac string) (NIC, error) + func (s *Service) CatalogImage(name string) (CatalogImage, error) + func (s *Service) CreateForward(ctx context.Context, sandbox, network string, ref Ref, port, listenPort int64, ...) (Forward, error) + func (s *Service) CreateInstance(ctx context.Context, req CreateInstance) (Instance, error) + func (s *Service) CreateNetwork(ctx context.Context, sandbox string, network Network) (Network, error) + func (s *Service) CreateSandbox(ctx context.Context, name string, ttl time.Duration, subject string) (Sandbox, error) + func (s *Service) CreateSnapshot(ctx context.Context, ref Ref, snapshot string) error + func (s *Service) DeleteFile(ctx context.Context, ref Ref, path string) error + func (s *Service) DeleteInstance(ctx context.Context, ref Ref) error + func (s *Service) DeleteNetwork(ctx context.Context, sandbox, name string) error + func (s *Service) DeleteSandbox(ctx context.Context, name string) error + func (s *Service) DeleteSnapshot(ctx context.Context, ref Ref, snapshot string) error + func (s *Service) DetachNIC(ctx context.Context, ref Ref, nic string) error + func (s *Service) Exec(ctx context.Context, req ExecRequest) (ExecResult, error) + func (s *Service) ExecJSON(ctx context.Context, req ExecRequest) (ExecResult, error) + func (s *Service) ExtendSandbox(ctx context.Context, name string, ttl time.Duration) (Sandbox, error) + func (s *Service) GetInstance(ctx context.Context, ref Ref) (Instance, error) + func (s *Service) GetNetwork(ctx context.Context, sandbox, name string) (Network, error) + func (s *Service) GetSandbox(ctx context.Context, name string) (Sandbox, []Instance, []Network, error) + func (s *Service) ImpairNIC(ctx context.Context, ref Ref, nic string, impairment Impairment) error + func (s *Service) InstanceForward(ctx context.Context, ref Ref, targetPort int64, protocol string) (Forward, error) + func (s *Service) ListImages(osName string, desktop *bool, platform string) []CatalogImage + func (s *Service) ListInstances(ctx context.Context, sandbox string) ([]Instance, error) + func (s *Service) ListNetworks(ctx context.Context, sandbox string) ([]Network, error) + func (s *Service) ListSandboxes(ctx context.Context) ([]Sandbox, error) + func (s *Service) ListSnapshots(ctx context.Context, ref Ref) ([]Snapshot, error) + func (s *Service) OpenExec(ctx context.Context, req ExecRequest) (io.ReadWriteCloser, error) + func (s *Service) PeerNetworks(ctx context.Context, sandbox, network, peer string) error + func (s *Service) PublishInstance(ctx context.Context, ref Ref, image string) (string, error) + func (s *Service) ReadBinaryFile(ctx context.Context, ref Ref, path string) (io.ReadCloser, time.Time, error) + func (s *Service) ReadFile(ctx context.Context, req FileReadRequest) (FileReadResult, error) + func (s *Service) Reap(ctx context.Context) error + func (s *Service) RemoveACLRule(ctx context.Context, sandbox, network, rule string) error + func (s *Service) ResolveImage(ctx context.Context, sandbox, name string) (CatalogImage, error) + func (s *Service) RestartInstance(ctx context.Context, ref Ref, force bool) (Instance, error) + func (s *Service) RestoreSnapshot(ctx context.Context, ref Ref, snapshot string) error + func (s *Service) RunReaper(ctx context.Context) error + func (s *Service) SandboxExpiry(ctx context.Context, name string) (time.Time, error) + func (s *Service) StartInstance(ctx context.Context, ref Ref, force bool) (Instance, error) + func (s *Service) StopInstance(ctx context.Context, ref Ref, force bool) (Instance, error) + func (s *Service) WaitInstance(ctx context.Context, req WaitRequest) (WaitResult, error) + func (s *Service) WriteFile(ctx context.Context, req FileWriteRequest) (FileWriteResult, error) + type Snapshot struct + CreatedAt time.Time + Name string + type WaitRequest struct + Ref Ref + Timeout time.Duration + Until string + type WaitResult struct + Elapsed time.Duration + Status string