Struct backstage::actor::Service[][src]

pub struct Service {
    pub status: ServiceStatus,
    pub name: String,
    pub up_since: SystemTime,
    pub downtime_ms: u64,
    pub microservices: HashMap<String, Service>,
    pub log_path: Option<String>,
}

An application’s metrics

Fields

status: ServiceStatus

The status of the service

name: String

Service name (ie app name or microservice name)

up_since: SystemTime

Timestamp since the service is up

downtime_ms: u64

Total milliseconds when the app service has been offline since up_since

microservices: HashMap<String, Service>

inner services similar

log_path: Option<String>

Optional log file path

Implementations

impl Service[src]

pub fn new() -> Self[src]

Create a new Service

pub fn set_status(self, service_status: ServiceStatus) -> Self[src]

Set the service status

pub fn update_status(&mut self, service_status: ServiceStatus)[src]

Update the service status

pub fn set_name(self, name: String) -> Self[src]

Set the service (application) name

pub fn update_name(&mut self, name: String)[src]

Update the service (application) name

pub fn get_name(&self) -> String[src]

Get the service (application) name

pub fn set_downtime_ms(self, downtime_ms: u64) -> Self[src]

Set the service downtime in milliseconds

pub fn set_log(self, log_path: String) -> Self[src]

Set the logging filepath

pub fn update_microservice(&mut self, service_name: String, microservice: Self)[src]

Insert a new microservice

pub fn update_microservice_status(
    &mut self,
    service_name: &str,
    status: ServiceStatus
)
[src]

Update the status of a microservice

pub fn delete_microservice(&mut self, service_name: &str)[src]

Delete a microservice

pub fn is_stopping(&self) -> bool[src]

Check if the service is stopping

pub fn is_stopped(&self) -> bool[src]

Check if the service is stopped

pub fn is_running(&self) -> bool[src]

Check if the service is running

pub fn is_starting(&self) -> bool[src]

Check if the service is starting

pub fn is_initializing(&self) -> bool[src]

Check if the service is initializing

pub fn is_maintenance(&self) -> bool[src]

Check if the service is in maintenance

pub fn is_degraded(&self) -> bool[src]

Check if the service is degraded

pub fn service_status(&self) -> &ServiceStatus[src]

Get the service status

Trait Implementations

impl Clone for Service[src]

impl Debug for Service[src]

impl Default for Service[src]

impl<'de> Deserialize<'de> for Service[src]

impl Serialize for Service[src]

Auto Trait Implementations

impl RefUnwindSafe for Service

impl Send for Service

impl Sync for Service

impl Unpin for Service

impl UnwindSafe for Service

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.