Skip to main content

Crate microsandbox_types

Crate microsandbox_types 

Source
Expand description

Shared task and wire contract types for microsandbox.

Structs§

CloudCreateSandboxRequest
Wire shape of a cloud sandbox create request body.
CloudErrorBody
Wire shape of the typed error body returned by cloud APIs on 4xx/5xx responses.
CloudErrorDetails
Nested cloud API error details.
CloudMessageResponse
Wire shape of the message response returned by mutation endpoints.
CloudPaginated
Wire shape of paginated list responses.
CloudSandbox
Wire shape of the cloud sandbox response returned by sandbox endpoints.
EnvVar
Environment variable entry.
HandoffInit
Fully-assembled handoff-init specification.
MountOptions
Guest mount behavior shared by every volume mount kind.
NamedVolumeCreate
Creation metadata for sandbox-time named volume provisioning.
NetworkSpec
Complete network specification for a sandbox.
OciRootfsSource
OCI root filesystem source.
PublishedPortSpec
A published port mapping between host and guest.
Rlimit
A POSIX resource limit.
SandboxPolicy
Sandbox lifecycle policy.
SandboxResources
CPU and memory resources for a sandbox.
SandboxRuntimeOptions
Guest runtime options for a sandbox.
SandboxSpec
Backend-neutral sandbox task description.
SnapshotSpec
Inputs to create a snapshot.
VolumeSpec
Configuration for creating a named volume.

Enums§

CloudSandboxStatus
Sandbox lifecycle status returned by the cloud control plane.
DiskImageFormat
Disk image format for virtio-blk root filesystems and volume mounts.
HostPermissions
Host permission propagation policy for a virtiofs-backed volume mount.
LogSource
Source tag on a captured log entry.
NamedVolumeMode
Sandbox-time behavior for a named volume mount.
Patch
Rootfs patch applied before VM startup.
PortProtocol
Transport protocol for a published port.
PullPolicy
Controls when an OCI registry is contacted for manifest freshness.
RlimitResource
POSIX resource limit identifiers.
RootfsSource
Root filesystem source for a sandbox.
SandboxLogLevel
Runtime log verbosity for sandbox specs.
SecurityProfile
Sandbox-level in-guest security profile.
SnapshotDestination
Where to place a new snapshot artifact.
StatVirtualization
Stat virtualization policy for a virtiofs-backed volume mount.
TypesError
Errors returned by shared microsandbox contract helpers.
VolumeKind
Storage kind for a named volume.
VolumeMount
A volume mount specification for a sandbox.

Constants§

DEFAULT_METRICS_SAMPLE_INTERVAL_MS
Default metrics sampling interval in milliseconds.
DEFAULT_SANDBOX_CPUS
Default number of virtual CPUs in a sandbox specification.
DEFAULT_SANDBOX_MEMORY_MIB
Default guest memory in MiB 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.

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§

TypesResult
The result type for shared microsandbox contract operations.