Expand description
Shared task and wire contract types for microsandbox.
Re-exports§
pub use modify::ChangeKind;pub use modify::ConfigPlannedChange;pub use modify::ModificationConflict;pub use modify::ModificationDisposition;pub use modify::ModificationPolicy;pub use modify::ModificationWarning;pub use modify::PlannedChange;pub use modify::ResourceConvergenceState;pub use modify::ResourceKind;pub use modify::ResourceResizeStatus;pub use modify::SandboxModificationPatch;pub use modify::SandboxModificationPlan;pub use modify::SecretChangeKind;pub use modify::SecretModificationPatch;pub use modify::SecretPlannedChange;pub use modify::SecretSource;
Modules§
- modify
- Sandbox modification contract shared by the SDKs, the CLI, and future backends.
Structs§
- Cert
Cache Config - Per-domain certificate cache configuration.
- Cloud
Create Sandbox Request - Wire shape of a cloud sandbox create request body.
- Cloud
Create Sandbox Response - Wire shape of the cloud sandbox response returned by sandbox endpoints.
- Cloud
Error Body - Wire shape of the typed error body returned by cloud APIs on 4xx/5xx responses.
- Cloud
Error Details - Nested cloud API error details.
- Cloud
Message Response - Wire shape of the message response returned by mutation endpoints.
- Cloud
Network Spec - Cloud network specification. Mirrors the domain
NetworkSpecbut omits the platform-controlled fields: interface overrides, host port mapping, DNS, TLS interception, and host-CA trust are set by the cloud, not the caller.deny_unknown_fields— posting an omitted field is an error, not a silent drop. - Cloud
Paginated - Wire shape of paginated list responses.
- Cloud
Sandbox Resources - Cloud resource request.
- Cloud
Sandbox Runtime Options - Cloud guest runtime options. Mirrors
SandboxRuntimeOptionsbut omits the platform-controlled fields: the hostname (pinned to the sandbox id) and the metrics-sampling knobs (metering integrity).deny_unknown_fields. - Cloud
Sandbox Spec - Cloud sandbox specification carried on create routes.
- DnsConfig
- DNS interception and filtering settings. Carried in
NetworkSpec::dns. - EnvVar
- Environment variable entry.
- Handoff
Init - Fully-assembled handoff-init specification.
- Intercept
CaConfig - Certificate authority configuration for TLS interception.
- Interface
Overrides - Optional guest interface overrides. Unset fields are derived from the
sandbox slot by the local network engine. Carried in
NetworkSpec::interface. - Mount
Options - Guest mount behavior shared by every volume mount kind.
- Named
Volume Create - Creation metadata for sandbox-time named volume provisioning.
- Network
Policy - Egress/ingress network policy: an ordered
Rulelist plus a per-direction defaultAction. Carried inNetworkSpec::policy. - Network
Spec - Complete network specification for a sandbox.
- OciRootfs
Source - OCI root filesystem source.
- Port
Range - Inclusive guest-side port range for a
Rulematch. - Published
Port Spec - A published port mapping between host and guest.
- Rlimit
- A POSIX resource limit.
- Rule
- A single egress/ingress policy rule. Evaluated first-match-wins per direction.
- Sandbox
Policy - Sandbox lifecycle policy.
- Sandbox
Resources - CPU and memory resources for a sandbox.
- Sandbox
Runtime Options - Guest runtime options for a sandbox.
- Sandbox
Spec - Backend-neutral sandbox task description.
- Scoped
Upstream CaCert - A CA certificate PEM file trusted only for matching upstream hosts.
- Scoped
Verify Upstream - An upstream certificate verification override for matching hosts.
- Secret
Entry - A single secret entry.
- Secret
Injection - Where in the HTTP request a secret can be injected.
- Secrets
Config - Placeholder-based secret injection for a sandbox’s TLS-intercepted egress.
- Snapshot
Spec - Inputs to create a snapshot.
- TlsConfig
- TLS interception configuration. Carried in
NetworkSpec::tls. - Volume
Spec - Configuration for creating a named volume.
Enums§
- Action
- Action to take on traffic matched by a
Rule(or a policy default). - Cloud
Rootfs Source - Cloud root filesystem source.
- Cloud
Sandbox Status - Sandbox lifecycle status returned by the cloud control plane.
- Destination
- Traffic destination filter for a
Rule. - Destination
Group - Pre-defined destination category for a
Destination::Groupmatch. - Direction
- Direction a
Ruleapplies to. - Disk
Image Format - Disk image format for virtio-blk root filesystems and volume mounts.
- Host
Pattern - Host pattern for a secret allowlist.
- Host
Permissions - Host permission propagation policy for a virtiofs-backed volume mount.
- LogSource
- Source tag on a captured log entry.
- Named
Volume Mode - Sandbox-time behavior for a named volume mount.
- Patch
- Rootfs patch applied before VM startup.
- Port
Protocol - Transport protocol for a published port.
- Protocol
- Protocol filter for a
Rule. - Pull
Policy - Controls when an OCI registry is contacted for manifest freshness.
- Rlimit
Resource - POSIX resource limit identifiers.
- Rootfs
Source - Root filesystem source for a sandbox.
- Sandbox
LogLevel - Runtime log verbosity for sandbox specs.
- Secret
Config Error - Invalid secret configuration.
- Security
Profile - Sandbox-level in-guest security profile.
- Snapshot
Destination - Where to place a new snapshot artifact.
- Stat
Virtualization - Stat virtualization policy for a virtiofs-backed volume mount.
- Types
Error - Errors returned by shared microsandbox contract helpers.
- Violation
Action - Action when a secret placeholder is detected going to a disallowed host.
- Volume
Kind - Storage kind for a named volume.
- Volume
Mount - A volume mount specification for a sandbox.
Constants§
- DEFAULT_
METRICS_ SAMPLE_ INTERVAL_ MS - Default metrics sampling interval in milliseconds.
- DEFAULT_
SANDBOX_ MEMORY_ MIB - Default guest memory in MiB in a sandbox specification.
- DEFAULT_
SANDBOX_ VCPUS - Default number of virtual CPUs in a sandbox specification.
- MAX_
HOSTNAME_ BYTES - Maximum UTF-8 byte length for a guest hostname (Linux
__NEW_UTS_LEN). - MAX_
SANDBOX_ NAME_ BYTES - Maximum UTF-8 byte length for a sandbox name.
- MAX_
SECRET_ PLACEHOLDER_ BYTES - Maximum supported secret placeholder length in bytes.
Functions§
- hostname_
from_ sandbox_ name - Derive a guest hostname from a sandbox name while fitting within
MAX_HOSTNAME_BYTES. - validate_
hostname - Validate an optional explicit guest hostname before it is forwarded to the guest agent.
- validate_
sandbox_ name - Validate that a sandbox name is safe: alphanumeric / dot / hyphen / underscore, 1..=128 bytes, and must start alphanumeric.
Type Aliases§
- Types
Result - The result type for shared microsandbox contract operations.