pub struct BoxRecord {Show 59 fields
pub id: String,
pub short_id: String,
pub name: String,
pub image: String,
pub isolation: ExecutionIsolation,
pub managed_execution: Option<ManagedExecutionMetadata>,
pub status: String,
pub pid: Option<u32>,
pub pid_start_time: Option<u64>,
pub cpus: u32,
pub memory_mb: u32,
pub volumes: Vec<String>,
pub virtiofs_cache: Option<String>,
pub env: HashMap<String, String>,
pub cmd: Vec<String>,
pub entrypoint: Option<Vec<String>>,
pub box_dir: PathBuf,
pub exec_socket_path: PathBuf,
pub console_log: PathBuf,
pub created_at: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
pub auto_remove: bool,
pub hostname: Option<String>,
pub user: Option<String>,
pub workdir: Option<String>,
pub restart_policy: String,
pub port_map: Vec<String>,
pub labels: HashMap<String, String>,
pub stopped_by_user: bool,
pub restart_count: u32,
pub max_restart_count: u32,
pub exit_code: Option<i32>,
pub health_check: Option<HealthCheck>,
pub healthcheck_disabled: bool,
pub health_status: String,
pub health_retries: u32,
pub health_last_check: Option<DateTime<Utc>>,
pub network_mode: NetworkMode,
pub network_name: Option<String>,
pub volume_names: Vec<String>,
pub tmpfs: Vec<String>,
pub anonymous_volumes: Vec<String>,
pub resource_limits: ResourceLimits,
pub log_config: LogConfig,
pub add_host: Vec<String>,
pub platform: Option<String>,
pub init: bool,
pub read_only: bool,
pub cap_add: Vec<String>,
pub cap_drop: Vec<String>,
pub security_opt: Vec<String>,
pub privileged: bool,
pub devices: Vec<String>,
pub gpus: Option<String>,
pub shm_size: Option<u64>,
pub stop_signal: Option<String>,
pub stop_timeout: Option<u64>,
pub oom_kill_disable: bool,
pub oom_score_adj: Option<i32>,
}Expand description
Metadata record for a single local box execution.
Fields§
§id: StringFull UUID.
short_id: StringFirst 12 hex characters of the UUID, without dashes.
name: StringUser-assigned or generated name.
image: StringOCI image reference.
isolation: ExecutionIsolationRequested execution isolation. Records written before this field default to MicroVM.
managed_execution: Option<ManagedExecutionMetadata>Runtime lifecycle identity and recoverable creation intent.
Legacy CLI-created records omit this field. Managed executions persist it before launch so an operation can be reconciled after a service restart without creating a second execution.
status: StringPersisted lifecycle state.
Legacy records use created, running, paused, stopped, and
dead. Managed executions additionally use the durable transition
states defined by ManagedExecutionState.
pid: Option<u32>Shim process PID while the execution is active.
pid_start_time: Option<u64>Start-time identity token used to reject a reused PID.
cpus: u32Number of virtual CPUs.
memory_mb: u32Memory in MiB.
volumes: Vec<String>Volume mounts encoded as host-to-guest pairs.
virtiofs_cache: Option<String>virtio-fs cache mode for host directory volumes.
env: HashMap<String, String>Environment variables.
cmd: Vec<String>Command override.
entrypoint: Option<Vec<String>>Entrypoint override.
box_dir: PathBufHost-side execution directory.
exec_socket_path: PathBufPath to the exec socket.
console_log: PathBufPath to the console log.
created_at: DateTime<Utc>Creation timestamp.
started_at: Option<DateTime<Utc>>Start timestamp.
auto_remove: boolWhether the execution is removed automatically after it stops.
hostname: Option<String>Custom hostname.
user: Option<String>User inside the workload.
workdir: Option<String>Working directory inside the workload.
restart_policy: StringRestart policy.
port_map: Vec<String>Port mappings.
labels: HashMap<String, String>User-defined labels.
stopped_by_user: boolWhether the execution was explicitly stopped by a user.
restart_count: u32Automatic restart count.
max_restart_count: u32Maximum restart count for a bounded on-failure policy.
exit_code: Option<i32>Last captured exit code.
health_check: Option<HealthCheck>Health-check configuration.
healthcheck_disabled: boolWhether an image-defined health check was disabled explicitly.
health_status: StringCurrent health state.
health_retries: u32Consecutive health-check failures.
health_last_check: Option<DateTime<Utc>>Timestamp of the most recent health check.
network_mode: NetworkModeNetwork mode.
network_name: Option<String>Attached bridge network name.
volume_names: Vec<String>Attached named volumes.
tmpfs: Vec<String>tmpfs mounts.
anonymous_volumes: Vec<String>Anonymous volumes materialized from OCI declarations.
resource_limits: ResourceLimitsHost resource controls.
log_config: LogConfigLogging configuration.
add_host: Vec<String>Custom host-to-IP mappings.
platform: Option<String>Target OCI platform.
init: boolWhether to run an init process as PID 1.
read_only: boolWhether the root filesystem is read-only.
cap_add: Vec<String>Added Linux capabilities.
cap_drop: Vec<String>Dropped Linux capabilities.
security_opt: Vec<String>OCI security options.
privileged: boolWhether extended privileges are enabled.
devices: Vec<String>Device mappings.
gpus: Option<String>GPU selection.
shm_size: Option<u64>Shared-memory size in bytes.
stop_signal: Option<String>Signal used for graceful stop.
stop_timeout: Option<u64>Graceful stop timeout in seconds.
oom_kill_disable: boolWhether the OOM killer is disabled.
oom_score_adj: Option<i32>Host OOM score adjustment.
Implementations§
Source§impl BoxRecord
impl BoxRecord
Sourcepub fn make_short_id(id: &str) -> String
pub fn make_short_id(id: &str) -> String
Generate the stable short ID used by local CLI and SDK lookup.
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Whether the persisted lifecycle state represents an active execution.
Sourcepub fn managed_state(&self) -> Result<Option<ManagedExecutionState>>
pub fn managed_state(&self) -> Result<Option<ManagedExecutionState>>
Parse the lifecycle state of a managed execution.
Legacy records return None. Unknown managed states fail closed so a
runtime service cannot operate on a record written by incompatible
code.
Sourcepub fn status_summary(&self) -> String
pub fn status_summary(&self) -> String
Render a concise lifecycle status with health, exit, and restart annotations.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BoxRecord
impl<'de> Deserialize<'de> for BoxRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BoxRecord
impl RefUnwindSafe for BoxRecord
impl Send for BoxRecord
impl Sync for BoxRecord
impl Unpin for BoxRecord
impl UnsafeUnpin for BoxRecord
impl UnwindSafe for BoxRecord
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more