Skip to main content

Crate vm_pool_protocol

Crate vm_pool_protocol 

Source
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.
OutputStream
Priority
Priority level for VM allocation. Higher priority VMs can evict lower priority ones when the pool is full.
ServiceCommand
Commands sent from Tasks to vm-pool service.
ServiceEvent
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).