pub struct ServiceCheck { /* private fields */ }
Expand description
A service check.
Service checks represent the status of a service at a particular point in time. Checks are simplistic, with a basic message, status enum (OK vs warning vs critical, etc), timestamp, and tags.
Implementations§
Source§impl ServiceCheck
impl ServiceCheck
Sourcepub fn status(&self) -> CheckStatus
pub fn status(&self) -> CheckStatus
Returns the status of the check.
Sourcepub fn timestamp(&self) -> Option<u64>
pub fn timestamp(&self) -> Option<u64>
Returns the timestamp of the check.
This is a Unix timestamp, or the number of seconds since the Unix epoch.
Returns the tags associated with the check.
Returns the origin tags associated with the check.
Sourcepub fn new(name: impl Into<MetaString>, status: CheckStatus) -> Self
pub fn new(name: impl Into<MetaString>, status: CheckStatus) -> Self
Creates a ServiceCheck
from the given name and status
Sourcepub fn with_timestamp(self, timestamp: impl Into<Option<u64>>) -> Self
pub fn with_timestamp(self, timestamp: impl Into<Option<u64>>) -> Self
Set the timestamp.
Represented as a Unix timestamp, or the number of seconds since the Unix epoch.
This variant is specifically for use in builder-style APIs.
Sourcepub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
pub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
Set the hostname where the service check originated from.
This variant is specifically for use in builder-style APIs.
Set the tags of the service check
This variant is specifically for use in builder-style APIs.
Sourcepub fn with_message(self, message: impl Into<Option<MetaString>>) -> Self
pub fn with_message(self, message: impl Into<Option<MetaString>>) -> Self
Set the message of the service check
This variant is specifically for use in builder-style APIs.
Set the origin tags of the service check
This variant is specifically for use in builder-style APIs.
Trait Implementations§
Source§impl Clone for ServiceCheck
impl Clone for ServiceCheck
Source§fn clone(&self) -> ServiceCheck
fn clone(&self) -> ServiceCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ServiceCheck
impl Debug for ServiceCheck
Source§impl PartialEq for ServiceCheck
impl PartialEq for ServiceCheck
Source§impl Serialize for ServiceCheck
impl Serialize for ServiceCheck
impl StructuralPartialEq for ServiceCheck
Auto Trait Implementations§
impl Freeze for ServiceCheck
impl RefUnwindSafe for ServiceCheck
impl Send for ServiceCheck
impl Sync for ServiceCheck
impl Unpin for ServiceCheck
impl UnwindSafe for ServiceCheck
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::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked
wrapper. Read more