Skip to main content

Module api_client

Module api_client 

Source
Expand description

Minimal Firecracker Management API client (HTTP/1.1 over Unix domain socket).

Firecracker exposes a REST API on a Unix socket created at startup. All configuration calls are synchronous PUT requests that return 204 No Content on success, or a JSON error body on failure.

This client is intentionally minimal — it covers only the paths needed for the L2-06 lifecycle (machine-config, boot-source, drive, action).

§Platform support

The HTTP-over-Unix-socket client (FirecrackerApiClient) is Linux-only — Firecracker itself only runs on Linux KVM, and the underlying transport (tokio::net::UnixStream) is unavailable on Windows. The pure-data request body types (MachineConfig, BootSource, …) are cross-platform so the workspace can cargo check cleanly on every host.

Structs§

BootSource
PUT /boot-source
Drive
PUT /drives/{drive_id}
FirecrackerApiClient
HTTP client that speaks to one Firecracker VMM over its Unix API socket.
InstanceAction
PUT /actions
MachineConfig
PUT /machine-config
MemBackend
NetworkInterface
PUT /network-interfaces/{iface_id}
SnapshotCreate
PUT /snapshot/create
SnapshotLoad
PUT /snapshot/load
VmStatePatch
PATCH /vm
VsockDevice
PUT /vsock

Enums§

InstanceActionType
MemBackendType
SnapshotType
VmState