Expand description
Request and response types that mirror Firecracker’s OpenAPI shapes.
Two-shape pattern per 10-data-model.md §
2.3: every external-facing struct
is split into a Raw* shape (the literal serde target with no validation rules) and
a validated newtype with private fields. Validation runs inside TryFrom, not
after serde. This makes “unvalidated DriveConfig” unrepresentable: the only path
from JSON to the domain type is through the validating constructor.
Field names match upstream’s swagger exactly (snake_case in nested JSON, derived
from firecracker.yaml); the static-config envelope uses kebab-case only at the
top level.
Re-exports§
pub use actions::InstanceAction;pub use actions::InstanceActionInfo;pub use balloon::BalloonConfig;pub use balloon::BalloonHintingOp;pub use balloon::BalloonStatsUpdate;pub use balloon::BalloonUpdate;pub use boot_source::BootSourceConfig;pub use common::DriveId;pub use common::IfaceId;pub use common::InstanceId;pub use common::MAX_DRIVES;pub use common::MAX_NICS;pub use common::MAX_PMEM;pub use common::MAX_VIRTIO_MEM;pub use common::MacAddr;pub use common::MemSizeMib;pub use common::SafePath;pub use common::UdsPath;pub use common::VsockId;pub use config_file::ConfigFile;pub use cpu_config::CpuConfig;pub use drive::DriveConfig;pub use drive::DrivePatch;pub use entropy::EntropyConfig;pub use hotplug_memory::HotplugMemoryConfig;pub use hotplug_memory::HotplugMemoryUpdate;pub use logger::LoggerConfig;pub use machine_config::MachineConfig;pub use machine_config::MachineConfigPatch;pub use metrics::MetricsConfig;pub use mmds::MmdsConfig;pub use mmds::MmdsContents;pub use network::NetworkInterfaceConfig;pub use network::NetworkPatch;pub use pmem::PmemConfig;pub use pmem::PmemPatch;pub use serial::SerialConfig;pub use snapshot::SnapshotCreateConfig;pub use snapshot::SnapshotLoadConfig;pub use vm::VmStateChange;pub use vsock::VsockConfig;
Modules§
- actions
/actionsPUT body.- balloon
/balloon,/balloon/statistics,/balloon/hinting/{op}bodies.- boot_
source /boot-sourcePUT body.- common
- Boundary newtypes shared across endpoint schemas.
- config_
file --config-filestatic-config envelope (20-firecracker-api.md § 6).- cpu_
config /cpu-configPUT body.- drive
/drives/{id}PUT and PATCH bodies.- entropy
/entropyPUT body — virtio-rng configuration.- hotplug_
memory /hotplug/memoryPUT and PATCH bodies — virtio-mem hotplug.- logger
/loggerPUT body.- machine_
config /machine-configrequest and response shapes.- metrics
/metricsPUT body.- mmds
/mmdsand/mmds/configbodies.- network
/network-interfaces/{id}PUT and PATCH bodies.- pmem
/pmem/{id}PUT and PATCH bodies — virtio-pmem on a memory-mapped file.- serial
/serialPUT body — guest-side serial console destination.- snapshot
/snapshot/createand/snapshot/loadbodies.- vm
PATCH /vmbody — pause / resume.- vsock
/vsockPUT body.
Structs§
- Instance
Info - Body of
GET /(theInstanceInforesource). - Version
Response - Body of
GET /version.
Enums§
- VmState
- Wire-shape lifecycle state served by
GET /and inside snapshot metadata.