Skip to main content

microsandbox_types/
lib.rs

1//! Shared task and wire contract types for microsandbox.
2
3#![warn(missing_docs)]
4
5extern crate self as microsandbox_types;
6
7mod cloud;
8mod command;
9mod domain;
10mod error;
11mod exec;
12
13#[doc(hidden)]
14pub mod compat;
15mod guest_flush;
16#[doc(hidden)]
17pub mod helpers;
18pub mod modify;
19mod registry;
20mod secret;
21pub mod snapshot;
22mod validation;
23
24#[cfg(feature = "ts")]
25pub mod typescript;
26
27//--------------------------------------------------------------------------------------------------
28// Exports
29//--------------------------------------------------------------------------------------------------
30
31pub use microsandbox_types_macros::ConfigPatch;
32
33pub use cloud::{
34    CloudCreateSandboxRequest, CloudCreateSandboxResponse, CloudCreateSnapshotRequest,
35    CloudDiskImageFormat, CloudErrorBody, CloudErrorDetails, CloudHostPattern,
36    CloudMessageResponse, CloudNetworkSpec, CloudPaginated, CloudPatch, CloudPullPolicy,
37    CloudRlimit, CloudRlimitResource, CloudRootfsSource, CloudSandboxComputeResources,
38    CloudSandboxResources, CloudSandboxRuntimeOptions, CloudSandboxSpec, CloudSandboxStatus,
39    CloudSandboxStatusReason, CloudSecretEntry, CloudSecretSource, CloudSecretsConfig,
40    CloudSnapshot, CloudSnapshotDetails, CloudSnapshotKind, CloudSnapshotLocation,
41    CloudSnapshotOperation, CloudSnapshotOperationStatus, CloudSnapshotSpec, CloudViolationAction,
42    CloudVolumeMount,
43};
44#[doc(hidden)]
45pub use command::{CommandResolutionError, ResolvedCommand, resolve_default_command};
46pub use domain::{
47    Action, CertCacheConfig, CpuPlacement, DEFAULT_METRICS_SAMPLE_INTERVAL_MS,
48    DEFAULT_SANDBOX_CPUS, DEFAULT_SANDBOX_MEMORY_MIB, DeploymentProfile, Destination,
49    DestinationGroup, Direction, DiskImageFormat, DnsConfig, DnsConfigPatch, EnvVar, FlatClone,
50    GuestClockPolicy, HandoffInit, HostPattern, HostPermissions, HttpConfig, HttpConfigPatch,
51    HttpConnectCredentials, HttpDenyResponseFormat, InterceptCaConfig, InterfaceOverrides,
52    InterfaceOverridesPatch, LogSource, MAX_SECRET_PLACEHOLDER_BYTES, MemoryPlacement,
53    MountOptions, NamedVolumeCreate, NamedVolumeMode, NetworkPolicy, NetworkRateLimitDirection,
54    NetworkRateLimiterConfig, NetworkRateLimiterConfigPatch, NetworkSpec, NetworkSpecPatch,
55    NumaPlacement, OciRootfsSource, OutboundProxy, OwnedVolumeStorage, Patch, PlacementProfile,
56    PortProtocol, PortRange, Protocol, PublishedPortSpec, PullPolicy, RateLimitConfigError,
57    RateLimiterConfig, Rlimit, RlimitResource, RootDisk, RootfsSource, Rule, SandboxLogLevel,
58    SandboxPolicy, SandboxPolicyPatch, SandboxResources, SandboxResourcesPatch,
59    SandboxRuntimeOptions, SandboxRuntimeOptionsPatch, SandboxSpec, SandboxSpecPatch,
60    ScopedUpstreamCaCert, ScopedVerifyUpstream, SecretConfigError, SecretEntry, SecretSubstitution,
61    SecretViolationAction, SecretsConfig, SecretsConfigPatch, SecurityProfile, SnapshotSpec,
62    Socks5Credentials, StatVirtualization, TlsConfig, TlsConfigPatch, TokenBucketConfig,
63    TransparentHugePagePolicy, VolumeKind, VolumeMount, VolumeSpec, VsockRouteSpec,
64    VsockSocketType, VsockSpec, VsockSpecPatch, WELL_KNOWN_NAT64_PREFIX,
65    canonicalize_volume_mounts, owned_volume_mount_id,
66};
67pub use error::{SnapshotManifestError, SnapshotManifestResult, TypesError, TypesResult};
68pub use exec::{EXEC_OUTPUT_EVENT_OVERHEAD, ExecLimits};
69pub use guest_flush::GuestFlush;
70pub use modify::{
71    ChangeKind, ConfigPlannedChange, ModificationConflict, ModificationDisposition,
72    ModificationPolicy, ModificationWarning, PlannedChange, ResourceConvergenceState, ResourceKind,
73    ResourceResizeStatus, SandboxModificationPatch, SandboxModificationPlan, SecretChangeKind,
74    SecretModificationPatch, SecretPlannedChange, SecretSource,
75};
76pub use registry::RegistryAuth;
77pub use secret::SecretValue;
78pub use snapshot::manifest::Manifest as SnapshotManifest;
79pub use snapshot::{
80    DiskCompactionDiskResult, DiskCompactionResult, DiskCompactionTarget,
81    ExternalMountRestorePolicy, ExternalMountWarning,
82};
83pub use validation::{
84    MAX_HOSTNAME_BYTES, MAX_SANDBOX_NAME_BYTES, hostname_from_sandbox_name, validate_hostname,
85    validate_sandbox_name,
86};