Expand description
Shared command and event type definitions for vm-pool.
This crate defines the protocol used for communication between:
- Host (service) ↔ VM (supervisor) over stdio
- Tasks (client) ↔ vm-pool (service) over Unix socket
Structs§
- LogLine
- A single log line with metadata.
- VmConfig
- Configuration for a VM.
- VmId
- Strongly-typed VM identifier.
Enums§
- LogStream
- Stream type for log output.
- Output
Stream - Priority
- Priority level for VM allocation. Higher priority VMs can evict lower priority ones when the pool is full.
- Service
Command - Commands sent from Tasks to vm-pool service.
- Service
Event - Events emitted by vm-pool service to Tasks.
- VmCommand
- Commands sent from host to supervisor (inside VM).
- VmEvent
- Events emitted by supervisor to host.
Functions§
- decode_
json_ line - Decode a JSON line.
- encode_
json_ line - Encode a value as a JSON line (no embedded newlines, terminated by \n).