pub enum ServiceEvent {
VmAllocated {
vm_id: VmId,
image: String,
},
VmReady {
vm_id: VmId,
},
VmEvent {
vm_id: VmId,
event: VmEvent,
},
VmStopped {
vm_id: VmId,
},
VmCrashed {
vm_id: VmId,
error: String,
},
PoolStatus {
total: usize,
available: usize,
allocated: usize,
},
VmLog {
vm_id: VmId,
stream: LogStream,
line: String,
},
LogTail {
vm_id: VmId,
lines: Vec<LogLine>,
},
LogsSubscribed {
vm_id: Option<VmId>,
},
Error {
message: String,
},
}Expand description
Events emitted by vm-pool service to Tasks.
Variants§
VmAllocated
VM was allocated.
VmReady
VM started and supervisor is ready.
VmEvent
Event forwarded from VM supervisor.
VmStopped
VM stopped (graceful).
VmCrashed
VM crashed or was killed.
PoolStatus
Pool status response.
VmLog
Log line from a VM (streamed).
LogTail
Response to TailLogs command.
LogsSubscribed
Acknowledgment of log subscription.
Error
An error occurred processing a command.
Trait Implementations§
Source§impl Clone for ServiceEvent
impl Clone for ServiceEvent
Source§fn clone(&self) -> ServiceEvent
fn clone(&self) -> ServiceEvent
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 ServiceEvent
impl Debug for ServiceEvent
Source§impl<'de> Deserialize<'de> for ServiceEvent
impl<'de> Deserialize<'de> for ServiceEvent
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 ServiceEvent
impl PartialEq for ServiceEvent
Source§impl Serialize for ServiceEvent
impl Serialize for ServiceEvent
impl StructuralPartialEq for ServiceEvent
Auto Trait Implementations§
impl Freeze for ServiceEvent
impl RefUnwindSafe for ServiceEvent
impl Send for ServiceEvent
impl Sync for ServiceEvent
impl Unpin for ServiceEvent
impl UnsafeUnpin for ServiceEvent
impl UnwindSafe for ServiceEvent
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