Skip to main content

microsandbox_types/
lib.rs

1//! Shared task and wire contract types for microsandbox.
2
3#![warn(missing_docs)]
4
5mod cloud;
6mod command;
7mod domain;
8mod error;
9pub mod modify;
10mod validation;
11
12#[cfg(feature = "ts")]
13pub mod typescript;
14
15//--------------------------------------------------------------------------------------------------
16// Exports
17//--------------------------------------------------------------------------------------------------
18
19pub use cloud::{
20    CloudCreateSandboxRequest, CloudCreateSandboxResponse, CloudDiskImageFormat, CloudErrorBody,
21    CloudErrorDetails, CloudHostPattern, CloudMessageResponse, CloudNetworkSpec, CloudPaginated,
22    CloudPatch, CloudPullPolicy, CloudRlimit, CloudRlimitResource, CloudRootfsSource,
23    CloudSandboxResources, CloudSandboxRuntimeOptions, CloudSandboxSpec, CloudSandboxStatus,
24    CloudSandboxStatusReason, CloudSecretEntry, CloudSecretSource, CloudSecretsConfig,
25    CloudViolationAction, CloudVolumeMount,
26};
27#[doc(hidden)]
28pub use command::{CommandResolutionError, ResolvedCommand, resolve_default_command};
29pub use domain::{
30    Action, CertCacheConfig, CpuPlacement, DEFAULT_METRICS_SAMPLE_INTERVAL_MS,
31    DEFAULT_SANDBOX_CPUS, DEFAULT_SANDBOX_MEMORY_MIB, DeploymentProfile, Destination,
32    DestinationGroup, Direction, DiskImageFormat, DnsConfig, DnsConfigPatch, EnvVar, FlatClone,
33    HandoffInit, HostPattern, HostPermissions, InterceptCaConfig, InterfaceOverrides,
34    InterfaceOverridesPatch, LogSource, MAX_SECRET_PLACEHOLDER_BYTES, MemoryPlacement,
35    MountOptions, NamedVolumeCreate, NamedVolumeMode, NetworkPolicy, NetworkRateLimitDirection,
36    NetworkRateLimiterConfig, NetworkRateLimiterConfigPatch, NetworkSpec, NetworkSpecPatch,
37    NumaPlacement, OciRootfsSource, OutboundProxy, Patch, PlacementProfile, PortProtocol,
38    PortRange, Protocol, PublishedPortSpec, PullPolicy, RateLimitConfigError, RateLimiterConfig,
39    Rlimit, RlimitResource, RootDisk, RootfsSource, Rule, SandboxConfigPatch, SandboxLogLevel,
40    SandboxPolicy, SandboxPolicyPatch, SandboxResources, SandboxResourcesPatch,
41    SandboxRuntimeOptions, SandboxRuntimeOptionsPatch, SandboxSpec, ScopedUpstreamCaCert,
42    ScopedVerifyUpstream, SecretConfigError, SecretEntry, SecretInjection, SecretsConfig,
43    SecretsConfigPatch, SecurityProfile, SnapshotSpec, Socks5Credentials, StatVirtualization,
44    TlsConfig, TlsConfigPatch, TokenBucketConfig, TransparentHugePagePolicy, ViolationAction,
45    VolumeKind, VolumeMount, VolumeSpec, VsockRouteSpec, VsockSocketType, VsockSpec,
46    VsockSpecPatch, canonicalize_volume_mounts,
47};
48pub use error::{TypesError, TypesResult};
49pub use modify::{
50    ChangeKind, ConfigPlannedChange, ModificationConflict, ModificationDisposition,
51    ModificationPolicy, ModificationWarning, PlannedChange, ResourceConvergenceState, ResourceKind,
52    ResourceResizeStatus, SandboxModificationPatch, SandboxModificationPlan, SecretChangeKind,
53    SecretModificationPatch, SecretPlannedChange, SecretSource,
54};
55pub use validation::{
56    MAX_HOSTNAME_BYTES, MAX_SANDBOX_NAME_BYTES, hostname_from_sandbox_name, validate_hostname,
57    validate_sandbox_name,
58};