Versions in this module Expand all Collapse all v0 v0.22.0 Aug 3, 2026 v0.21.0 Jul 30, 2026 Changes in this version + var ErrAlreadyExists = errors.New("sandbox already exists") + var ErrNotFound = errors.New("sandbox not found") + func DispatchRunsc() + func InboundSockPath(stateDir string, id SandboxID) string + func InitHostCgroup() (string, error) — linux/amd64 + func ShouldSkipReap(pid int) bool — linux/amd64 + type BackendListener struct + Addr string + MatchPort int32 + Name string + Priority int + Shape string + func PickBackend(backends []BackendListener, dstPort uint16) *BackendListener + type EgressController interface + SetInvocationID func(id SandboxID, invocationID string) error + SetServiceEgress func(id SandboxID, services []ServiceEgress) error + type EgressInit struct + DNSResolvers []string + EgressHostAddr string + IMDSHostAddr string + IMDSV4 string + IMDSV6 string + type ImageInfo struct + Cmd []string + Entrypoint []string + RootFS string + type ImageStore struct + func NewImageStore(baseDir string, opts ...ImageStoreOption) *ImageStore + func (s *ImageStore) CachedRefs() []string + func (s *ImageStore) EnsureImage(ctx context.Context, imageRef string, cred auth.Credential) (*ImageInfo, error) + type ImageStoreOption func(*ImageStore) + func WithImageStoreLogger(l *slog.Logger) ImageStoreOption + type Instance struct + CreatedAt time.Time + GatewayIP netip.Addr + ID SandboxID + InboundSocket string + Phase SandboxPhase + RootFS string + SandboxIP netip.Addr + Stderr io.ReadCloser + Stdin io.WriteCloser + Stdout io.ReadCloser + type Manager struct — linux/amd64 + func NewManager(cfg ManagerConfig) *Manager + func (m *Manager) Cleanup(ctx context.Context) error + func (m *Manager) Create(ctx context.Context, spec Spec) (*Instance, error) + func (m *Manager) Delete(ctx context.Context, id SandboxID) error + func (m *Manager) EnsureImage(ctx context.Context, ref string, cred auth.Credential) (*ImageInfo, error) + func (m *Manager) ImageStore() *ImageStore + func (m *Manager) Kill(ctx context.Context, id SandboxID) error + func (m *Manager) List() []*Instance + func (m *Manager) Purge(ctx context.Context, id SandboxID) + func (m *Manager) Start(ctx context.Context, id SandboxID) error + func (m *Manager) Status(ctx context.Context, id SandboxID) (*Instance, error) + func (m *Manager) Stop(ctx context.Context, id SandboxID) error + func (m *Manager) Wait(ctx context.Context, id SandboxID) (int, error) + type ManagerConfig struct — linux/amd64 + HostCgroupPath string + ImageStore *ImageStore + LogSinkFor func(id SandboxID) StdioSink + RootDir string + StateDir string + type Mount struct + Destination string + Options []string + Source string + Type string + type Policy struct + DefaultDeny bool + Rules []Rule + func (p *Policy) Allow(dst netip.AddrPort, proto, dstName string) bool + type PortRange struct + End int32 + Start int32 + type Rule struct + DestinationCIDRs []string + DestinationHostnames []string + Listeners []string + Ports []PortRange + Protocol string + type Runtime interface + Cleanup func(ctx context.Context) error + Create func(ctx context.Context, spec Spec) (*Instance, error) + Delete func(ctx context.Context, id SandboxID) error + Kill func(ctx context.Context, id SandboxID) error + List func() []*Instance + Purge func(ctx context.Context, id SandboxID) + Start func(ctx context.Context, id SandboxID) error + Status func(ctx context.Context, id SandboxID) (*Instance, error) + Stop func(ctx context.Context, id SandboxID) error + Wait func(ctx context.Context, id SandboxID) (exitCode int, err error) + type SandboxID string + type SandboxPhase string + const SandboxCreating + const SandboxReady + const SandboxRunning + const SandboxStopped + const SandboxStopping + type ServiceEgress struct + Backends []BackendListener + Policy *Policy + Service string + type Spec struct + Annotations map[string]string + Args []string + CPUMillis int64 + Command []string + ControlForwardAddr string + ControlHostAddr string + Egress EgressInit + Env []string + ID SandboxID + Image string + ImagePullCredential auth.Credential + InboundListenAddr string + MemBytes int64 + Mounts []Mount + Stdio bool + type StdioSink struct + Close func() + Stderr io.Writer + Stdout io.Writer