pub enum ServiceCommand {
Allocate {
image: String,
config: VmConfig,
},
Deallocate {
vm_id: VmId,
},
Send {
vm_id: VmId,
command: VmCommand,
},
Snapshot {
vm_id: VmId,
name: String,
},
Restore {
vm_id: VmId,
snapshot: String,
},
Status,
TailLogs {
vm_id: VmId,
lines: usize,
},
SubscribeLogs {
vm_id: Option<VmId>,
},
UnsubscribeLogs,
}Expand description
Commands sent from Tasks to vm-pool service.
Variants§
Allocate
Allocate a new VM from the pool.
Deallocate
Deallocate a VM back to the pool.
Send
Send a command to a VM.
Snapshot
Save VM state to a snapshot.
Restore
Restore VM from a snapshot.
Status
Get pool status.
TailLogs
Get last N log lines from a VM.
SubscribeLogs
Subscribe to real-time logs from a VM (or all VMs if None).
UnsubscribeLogs
Unsubscribe from log streaming.
Trait Implementations§
Source§impl Clone for ServiceCommand
impl Clone for ServiceCommand
Source§fn clone(&self) -> ServiceCommand
fn clone(&self) -> ServiceCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceCommand
impl Debug for ServiceCommand
Source§impl<'de> Deserialize<'de> for ServiceCommand
impl<'de> Deserialize<'de> for ServiceCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ServiceCommand
impl PartialEq for ServiceCommand
Source§impl Serialize for ServiceCommand
impl Serialize for ServiceCommand
impl StructuralPartialEq for ServiceCommand
Auto Trait Implementations§
impl Freeze for ServiceCommand
impl RefUnwindSafe for ServiceCommand
impl Send for ServiceCommand
impl Sync for ServiceCommand
impl Unpin for ServiceCommand
impl UnsafeUnpin for ServiceCommand
impl UnwindSafe for ServiceCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more