Expand description
Client library for communicating with the vm-pool service.
Provides a high-level async API over the Unix socket protocol.
§Example
use vm_pool_client::Client;
use vm_pool_protocol::VmConfig;
let mut client = Client::connect("/tmp/vm-pool.sock").await?;
let status = client.status().await?;
println!("available: {}", status.available);
let vm_id = client.allocate("agent:v1.0.0", VmConfig::default()).await?;
println!("allocated: {}", vm_id);
client.deallocate(&vm_id).await?;Structs§
- Client
- Client for communicating with the vm-pool service.
- Pool
Status - Pool status information.