pub struct Service {
    pub actor_type_id: TypeId,
    pub actor_type_name: &'static str,
    pub status: ServiceStatus,
    pub directory: Option<String>,
    pub up_since: SystemTime,
    pub downtime_ms: u64,
    pub microservices: HashMap<ScopeId, Self>,
    pub inactive: HashMap<String, ScopeId>,
}
Expand description

An actor’s service metrics

Fields

actor_type_id: TypeId

The actor’s type id, who owns/manages the service

actor_type_name: &'static str

The actor type name, only for debuging or to provide context

status: ServiceStatus

The status of the actor

directory: Option<String>

The directory name of the actor, must be unique within the same spawned level

up_since: SystemTime

The start timestamp, used to calculate uptime

downtime_ms: u64

Accumulated downtime

microservices: HashMap<ScopeId, Self>

Microservices

inactive: HashMap<String, ScopeId>

Highlight any stopped service in microservices;

Implementations

Create a new Service

Create scopes iterator for a the provided Child type

Return the actor type id

Return actor type name, note: only for debuging

Set the service status

Update the service status

Return the directory name of the actor (if available)

Set the service downtime in milliseconds

Check the owner actor’s type of the service

Check if the service is stopping

Check if the service is stopped

Check if the service is running

Check if the service is idle

Check if the service status is outage

Check if the service is starting

Check if the service is initializing

Check if the service is in maintenance

Check if the service is degraded

Get the service status

Return immutable reference to the microservices HashMap

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Serialize this value into the given Serde serializer. Read more

The type of this item’s child items Read more

Write the item’s own contents (without children) to f Read more

Retrieve a list of this item’s children Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.