pub struct NodeSnapshot {Show 16 fields
pub name: String,
pub kind: NodeKind,
pub process_name: Option<String>,
pub process_id: Option<u64>,
pub state: NodeState,
pub restart: RestartType,
pub significant: bool,
pub created_at: UnixMillis,
pub started_at: Option<UnixMillis>,
pub uptime_ms: Option<u64>,
pub restart_count: u32,
pub exited_at: Option<UnixMillis>,
pub resource_group: Option<String>,
pub resources: Option<ResourceUsage>,
pub supervision: Option<SupervisionSettings>,
pub children: Vec<NodeSnapshot>,
}Expand description
One node – a supervisor or a worker – in a TreeSnapshot.
Fields§
§name: StringThe node’s bare name, as registered with its supervisor.
kind: NodeKindWhether the node is a supervisor or a worker.
process_name: Option<String>The node’s fully qualified, dot-scoped process name. None if the node has never run.
process_id: Option<u64>Identifier of the node’s most recent process. None if the node has never run.
A restart gives the node a new process, and so a new identifier. A node that has stopped keeps the identifier
it last ran under, which is what state is for: this says what the node ran as, and state says whether it
still is.
state: NodeStateWhere the node is in its lifecycle.
restart: RestartTypeThe node’s restart policy.
significant: boolWhether the node’s termination can drive its supervisor to shut down.
created_at: UnixMillisWhen the node first became part of the tree.
Constant across restarts, so the difference between this and started_at is the time the node has spent not
running since it was created.
started_at: Option<UnixMillis>When the node’s most recent process started. None if the node has never run.
uptime_ms: Option<u64>How long the node’s current process has been running, in milliseconds. None unless it is running.
restart_count: u32How many times the node has been restarted since it was created.
Counts every restart that gave the node a new process, whether it was restarted on its own account or brought back as part of its supervisor restarting – either by a group restart or by the supervisor itself being restarted from above. Only statically declared nodes accumulate this across a supervisor restart, since only they have an identity that survives one; a dynamically spawned node is never restored.
exited_at: Option<UnixMillis>When the node exited without being restarted. None unless it has exited.
resource_group: Option<String>The resource group the node’s allocations are attributed to. None if the node has never run.
For a supervisor this is its own group. For a worker it is its supervisor’s, since a worker inherits its supervisor’s group rather than owning one.
resources: Option<ResourceUsage>Resource usage attributed to this node.
Populated for a supervisor, which owns a resource group covering itself and its workers. Always absent for a
worker, whose usage is counted against the supervisor named by resource_group.
supervision: Option<SupervisionSettings>How the node supervises its children. Absent for a worker.
children: Vec<NodeSnapshot>The node’s children.
For a worker, this holds the children that it spawned into its own scope, and any supervisor that it drives. For most workers, it is empty.
Trait Implementations§
Source§impl Clone for NodeSnapshot
impl Clone for NodeSnapshot
Source§fn clone(&self) -> NodeSnapshot
fn clone(&self) -> NodeSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeSnapshot
impl Debug for NodeSnapshot
Source§impl<'de> Deserialize<'de> for NodeSnapshot
impl<'de> Deserialize<'de> for NodeSnapshot
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>,
Auto Trait Implementations§
impl Freeze for NodeSnapshot
impl RefUnwindSafe for NodeSnapshot
impl Send for NodeSnapshot
impl Sync for NodeSnapshot
impl Unpin for NodeSnapshot
impl UnsafeUnpin for NodeSnapshot
impl UnwindSafe for NodeSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more