Versions in this module Expand all Collapse all v0 v0.1.3 Mar 14, 2026 Changes in this version type Box + func (b *Box) ExecStream(command string, opts *ExecOptions, cb ExecStreamCallbacks) (*ExecResult, error) + type ExecStreamCallbacks struct + OnStderr func(string) + OnStdout func(string) v0.1.2 Mar 13, 2026 v0.1.1 Mar 12, 2026 Changes in this version + var ErrMountInvalidConfig = errors.New("invalid mount config") + func ValidateMounts(mounts []Mount) error type BoxOptions + Mounts []Mount + type Mount struct + GuestPath string + HostPath string + ReadOnly bool v0.1.0 Mar 4, 2026 Changes in this version + var ErrNativeUnavailable = errors.New(...) + var ErrNetworkInvalidConfig = errors.New("invalid network config") + var ErrNetworkUnsupportedPlatform = errors.New("network unsupported on this platform") + func ListOfflineImages() ([]string, error) + func ValidateNetworkConfig(cfg *NetworkConfig) error + type Box struct + func (b *Box) Close() + func (b *Box) Exec(command string, opts *ExecOptions) (*ExecResult, error) + func (b *Box) ID() string + func (b *Box) Info() (BoxInfo, error) + func (b *Box) Name() string + func (b *Box) Start() error + func (b *Box) Stop() error + type BoxInfo struct + CreatedAt time.Time + ID string + Image string + Name string + State string + type BoxOptions struct + CPUs int + Env map[string]string + Image string + LocalBundlePath string + MemoryMB int + Network *NetworkConfig + OfflineImage string + RootfsPath string + WorkingDir string + type CIDRRule struct + CIDR string + PortEnd uint16 + PortStart uint16 + Protocol Protocol + type DNSConfig struct + BlockPrivate bool + SearchDomains []string + Servers []string + type DomainRule struct + Domain string + Port uint16 + Protocol Protocol + type ExecOptions struct + Args []string + Env map[string]string + TTY bool + Timeout time.Duration + User string + WorkingDir string + type ExecResult struct + ExitCode int + Stderr []string + Stdout []string + type NetworkConfig struct + Enabled bool + IsolateFromHostLAN bool + Mode NetworkMode + Policy *NetworkPolicy + PortForwards []PortForward + func BalancedNetworkProfile() *NetworkConfig + func OpenNetworkProfile() *NetworkConfig + func StrictNetworkProfile() *NetworkConfig + type NetworkMode string + const NetworkBridged + const NetworkDisabled + const NetworkNAT + type NetworkPolicy struct + AllowCIDR []CIDRRule + AllowDomain []DomainRule + DNS *DNSConfig + DenyCIDR []CIDRRule + DenyDomain []DomainRule + Limits *TrafficLimits + Mode PolicyMode + Proxy *ProxyConfig + type OfflineImageMetadata struct + Archive string + Name string + SHA256 string + SizeBytes int64 + func ListOfflineImageMetadata() ([]OfflineImageMetadata, error) + type PolicyMode string + const PolicyAllowAll + const PolicyBlockAll + type PortForward struct + GuestPort uint16 + HostIP string + HostPort uint16 + Protocol Protocol + type Protocol string + const ProtoAny + const ProtoTCP + const ProtoUDP + type ProxyConfig struct + Enforce bool + HTTPProxy string + HTTPSProxy string + NoProxy []string + type Runtime struct + func NewRuntime(opts *RuntimeOptions) (*Runtime, error) + func (r *Runtime) Close() + func (r *Runtime) CreateBox(ctx context.Context, name string, opts BoxOptions) (*Box, error) + func (r *Runtime) GetBox(ctx context.Context, idOrName string) (*Box, error) + func (r *Runtime) ListBoxes(ctx context.Context) ([]BoxInfo, error) + func (r *Runtime) RemoveBox(ctx context.Context, idOrName string, force bool) error + type RuntimeNetworkDefaults struct + Config *NetworkConfig + Profile string + type RuntimeOptions struct + HomeDir string + ImageRegistries []string + NetworkDefaults *RuntimeNetworkDefaults + type TrafficLimits struct + MaxConnections int + MaxEgressBytesPerSec int64 + MaxIngressBytesPerSec int64