pub struct ComputeSpec {Show 16 fields
pub version: u32,
pub root: RootSource,
pub kernel: String,
pub kernel_cmdline: Option<String>,
pub vcpus: u32,
pub mem_mib: u32,
pub entrypoint: Vec<String>,
pub env: BTreeMap<String, String>,
pub port: u16,
pub restart: RestartPolicy,
pub scale_to_zero: bool,
pub volumes: Vec<VolumeRef>,
pub writable_root: bool,
pub isolation: IsolationRequirement,
pub prefer_backend: Option<String>,
pub bindings: Vec<ComputeBinding>,
}Expand description
An immutable, content-addressed compute workload version (the analogue of a
deployment manifest). Stored at computever/<hash>; the rootfs + kernel are
blob hashes in the shared blob store (deduped, cached forever).
Fields§
§version: u32Pinned schema discriminant (v1).
root: RootSourceThe source of the workload’s root filesystem: an OCI image reference, a tar
rootfs archive, or a rootfs filesystem image, per the target substrate (see
RootSource).
kernel: StringBlob hash of the vmlinux kernel (shared across workloads). Applies only to
the micro-VM substrate (a RootSource::Rootfs source); ignored otherwise, so
an image/tar workload omits it (empty ⇒ absent from the wire + the content hash).
kernel_cmdline: Option<String>Kernel boot cmdline override; None uses the executor default.
vcpus: u32Virtual CPUs.
mem_mib: u32Guest memory in MiB.
entrypoint: Vec<String>The in-guest entrypoint (argv) the init execs.
env: BTreeMap<String, String>Environment variables for the entrypoint.
port: u16The TCP port the app listens on inside the guest (the gateway targets it).
restart: RestartPolicyRestart policy for the guest process.
scale_to_zero: boolSnapshot + stop when idle; restore on the next request (cold start).
volumes: Vec<VolumeRef>Persistent volumes (opt-in).
writable_root: boolAllow a writable root filesystem instead of the hardened read-only-root
default. Opt-in and honored only under the single-tenant isolation
posture (a backend forces read-only root under the multi-tenant guard).
The idiomatic path for app writes remains a VolumeRef; this is for images
that write outside a declared volume. Default off; omitted from the wire + the
content hash when false (back-compat).
isolation: IsolationRequirementIsolation the workload requires; selects which backends are eligible.
Default Trusted; omitted from the serialized
spec when default, so existing specs keep their content hash.
prefer_backend: Option<String>Optional preferred backend id (vmm/container/cloudflare/docker);
the scheduler honors it when the backend is eligible, else falls back.
bindings: Vec<ComputeBinding>Managed resources this workload depends on — the opaque-process analogue of a
handler’s imports. boatramp resolves each to a tenant-scoped endpoint +
credential at launch and injects the address into the guest env, so a workload
reaches the managed sql (and, later, kv/blob/messaging) without a hand-glued
URL. Empty ⇒ omitted from the wire + the content hash (back-compat).
Implementations§
Trait Implementations§
Source§impl Clone for ComputeSpec
impl Clone for ComputeSpec
Source§fn clone(&self) -> ComputeSpec
fn clone(&self) -> ComputeSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputeSpec
impl Debug for ComputeSpec
Source§impl<'de> Deserialize<'de> for ComputeSpec
impl<'de> Deserialize<'de> for ComputeSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComputeSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ComputeSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ComputeSpec
Source§impl PartialEq for ComputeSpec
impl PartialEq for ComputeSpec
Source§impl Serialize for ComputeSpec
impl Serialize for ComputeSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ComputeSpec
Auto Trait Implementations§
impl Freeze for ComputeSpec
impl RefUnwindSafe for ComputeSpec
impl Send for ComputeSpec
impl Sync for ComputeSpec
impl Unpin for ComputeSpec
impl UnsafeUnpin for ComputeSpec
impl UnwindSafe for ComputeSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.