diff --git a/lib/saluki-components/src/destinations/datadog_metrics/mod.rs b/lib/saluki-components/src/destinations/datadog_metrics/mod.rs index a0669144..afc7b758 100644 --- a/lib/saluki-components/src/destinations/datadog_metrics/mod.rs +++ b/lib/saluki-components/src/destinations/datadog_metrics/mod.rs @@ -240,7 +240,7 @@ where debug!(events_len = event_buffer.len(), "Processing event buffer."); for event in event_buffer { - if let Some(metric) = event.into_metric() { + if let Some(metric) = event.try_into_metric() { let request_builder = match MetricsEndpoint::from_metric(&metric) { MetricsEndpoint::Series => &mut series_request_builder, MetricsEndpoint::Sketches => &mut sketches_request_builder, diff --git a/lib/saluki-components/src/destinations/prometheus/mod.rs b/lib/saluki-components/src/destinations/prometheus/mod.rs index 0f77fe0d..e680ddd9 100644 --- a/lib/saluki-components/src/destinations/prometheus/mod.rs +++ b/lib/saluki-components/src/destinations/prometheus/mod.rs @@ -119,7 +119,7 @@ impl Destination for Prometheus { // Process each metric event in the batch, either merging it with the existing value or // inserting it for the first time. for event in events { - if let Some(metric) = event.into_metric() { + if let Some(metric) = event.try_into_metric() { let (context, value, _) = metric.into_parts(); // Skip any metric types we can't handle. diff --git a/lib/saluki-components/src/sources/dogstatsd/mod.rs b/lib/saluki-components/src/sources/dogstatsd/mod.rs index 3ba99b6c..23739e15 100644 --- a/lib/saluki-components/src/sources/dogstatsd/mod.rs +++ b/lib/saluki-components/src/sources/dogstatsd/mod.rs @@ -417,7 +417,7 @@ async fn drive_stream( if origin_detection { if let ConnectionAddress::ProcessLike(Some(creds)) = &peer_addr { for event in &mut event_buffer { - if let Some(metric) = event.as_metric_mut() { + if let Some(metric) = event.try_as_metric_mut() { if metric.metadata().origin_entity().is_none() { metric .metadata_mut() diff --git a/lib/saluki-components/src/transforms/aggregate/mod.rs b/lib/saluki-components/src/transforms/aggregate/mod.rs index 626807b0..df404686 100644 --- a/lib/saluki-components/src/transforms/aggregate/mod.rs +++ b/lib/saluki-components/src/transforms/aggregate/mod.rs @@ -268,7 +268,7 @@ impl Transform for Aggregate { let event_buffer_len = event_buffer.len(); for event in events { - if let Some(metric) = event.into_metric() { + if let Some(metric) = event.try_into_metric() { if self.forward_timestamped_metrics && metric.metadata().timestamp().is_some() { event_buffer.push(Event::Metric(metric)); } else if !state.insert(metric) { @@ -523,7 +523,7 @@ mod tests { let mut metrics = event_buffer .into_iter() - .filter_map(|event| event.into_metric()) + .filter_map(|event| event.try_into_metric()) .collect::>(); metrics.sort_by(|a, b| a.context().name().cmp(b.context().name())); metrics diff --git a/lib/saluki-components/src/transforms/host_enrichment/mod.rs b/lib/saluki-components/src/transforms/host_enrichment/mod.rs index 3fc7d71c..689a86ad 100644 --- a/lib/saluki-components/src/transforms/host_enrichment/mod.rs +++ b/lib/saluki-components/src/transforms/host_enrichment/mod.rs @@ -71,7 +71,7 @@ impl HostEnrichment { impl SynchronousTransform for HostEnrichment { fn transform_buffer(&self, event_buffer: &mut EventBuffer) { for event in event_buffer { - if let Some(metric) = event.as_metric_mut() { + if let Some(metric) = event.try_as_metric_mut() { self.enrich_metric(metric) } } diff --git a/lib/saluki-components/src/transforms/origin_enrichment/mod.rs b/lib/saluki-components/src/transforms/origin_enrichment/mod.rs index a32261e4..3d812ba8 100644 --- a/lib/saluki-components/src/transforms/origin_enrichment/mod.rs +++ b/lib/saluki-components/src/transforms/origin_enrichment/mod.rs @@ -247,7 +247,7 @@ where { fn transform_buffer(&self, event_buffer: &mut EventBuffer) { for event in event_buffer { - if let Some(metric) = event.as_metric_mut() { + if let Some(metric) = event.try_as_metric_mut() { self.enrich_metric(metric) } } diff --git a/lib/saluki-core/src/topology/graph.rs b/lib/saluki-core/src/topology/graph.rs index fff4dab9..082b9343 100644 --- a/lib/saluki-core/src/topology/graph.rs +++ b/lib/saluki-core/src/topology/graph.rs @@ -447,9 +447,9 @@ mod test { fn invalid_input_id() { let mut graph = Graph::default(); let result = graph - .with_source("in_log", DataType::Log) - .with_destination("out_log", DataType::Log) - .with_edge_fallible("in log", "out_log") + .with_source("in_eventd", DataType::EventD) + .with_destination("out_eventd", DataType::EventD) + .with_edge_fallible("in log", "out_eventd") .map(|_| ()); // ditch mutable self ref to allow for equality check assert!(result.is_err()); @@ -460,9 +460,9 @@ mod test { fn nonexistent_input_id() { let mut graph = Graph::default(); let result = graph - .with_source("in_log", DataType::Log) - .with_destination("out_log", DataType::Log) - .with_edge_fallible("in_loog", "out_log") + .with_source("in_eventd", DataType::EventD) + .with_destination("out_eventd", DataType::EventD) + .with_edge_fallible("in_loog", "out_eventd") .map(|_| ()); // ditch mutable self ref to allow for equality check assert_eq!(result, Err(component_id_doesnt_exist("in_loog"))); @@ -470,8 +470,8 @@ mod test { let mut graph = Graph::default(); let result = graph .with_source("in_all_but_logs", DataType::all_bits()) - .with_destination("out_log", DataType::Log) - .with_edge_fallible("in_all_but_logs.logs", "out_log") + .with_destination("out_eventd", DataType::EventD) + .with_edge_fallible("in_all_but_logs.logs", "out_eventd") .map(|_| ()); // ditch mutable self ref to allow for equality check assert_eq!(result, Err(output_id_doesnt_exist("in_all_but_logs.logs"))); @@ -481,17 +481,17 @@ mod test { fn multiple_outputs() { let mut graph = Graph::default(); graph - .with_source("in_log", DataType::Log) + .with_source("in_eventd", DataType::EventD) .with_transform_multiple_outputs( - "log_to_log", - DataType::Log, - &[(None, DataType::Log), (Some("errors"), DataType::Log)], + "eventd_to_eventd", + DataType::EventD, + &[(None, DataType::EventD), (Some("errors"), DataType::EventD)], ) - .with_destination("out_log", DataType::Log) - .with_destination("out_errored_log", DataType::Log) - .with_edge("in_log", "log_to_log") - .with_edge("log_to_log", "out_log") - .with_edge("log_to_log.errors", "out_errored_log"); + .with_destination("out_eventd", DataType::EventD) + .with_destination("out_errored_eventd", DataType::EventD) + .with_edge("in_eventd", "eventd_to_eventd") + .with_edge("eventd_to_eventd", "out_eventd") + .with_edge("eventd_to_eventd.errors", "out_errored_eventd"); assert_eq!(Ok(()), graph.check_data_types()); } @@ -500,11 +500,11 @@ mod test { fn detect_cycles() { let mut graph = Graph::default(); graph - .with_source("in", DataType::Log) - .with_transform("one", DataType::Log, DataType::Log) - .with_transform("two", DataType::Log, DataType::Log) - .with_transform("three", DataType::Log, DataType::Log) - .with_destination("out", DataType::Log) + .with_source("in", DataType::EventD) + .with_transform("one", DataType::EventD, DataType::EventD) + .with_transform("two", DataType::EventD, DataType::EventD) + .with_transform("three", DataType::EventD, DataType::EventD) + .with_destination("out", DataType::EventD) .with_multi_edge(&["in", "three"], "one") .with_edge("one", "two") .with_edge("two", "three") @@ -519,11 +519,11 @@ mod test { let mut graph = Graph::default(); graph - .with_source("in", DataType::Log) - .with_transform("one", DataType::Log, DataType::Log) - .with_transform("two", DataType::Log, DataType::Log) - .with_transform("three", DataType::Log, DataType::Log) - .with_destination("out", DataType::Log) + .with_source("in", DataType::EventD) + .with_transform("one", DataType::EventD, DataType::EventD) + .with_transform("two", DataType::EventD, DataType::EventD) + .with_transform("three", DataType::EventD, DataType::EventD) + .with_destination("out", DataType::EventD) .with_multi_edge(&["in", "three"], "one") .with_edge("one", "two") .with_edge("two", "three") @@ -541,10 +541,10 @@ mod test { fn disconnected_components() { let mut graph = Graph::default(); graph - .with_source("in", DataType::Log) - .with_transform("one", DataType::Log, DataType::Log) - .with_transform("two", DataType::Log, DataType::Log) - .with_destination("out", DataType::Log) + .with_source("in", DataType::EventD) + .with_transform("one", DataType::EventD, DataType::EventD) + .with_transform("two", DataType::EventD, DataType::EventD) + .with_destination("out", DataType::EventD) .with_edge("in", "out"); assert_eq!( @@ -559,11 +559,11 @@ mod test { fn diamond_edge_formation() { let mut graph = Graph::default(); graph - .with_source("in", DataType::Log) - .with_transform("one", DataType::Log, DataType::Log) - .with_transform("two", DataType::Log, DataType::Log) - .with_transform("three", DataType::Log, DataType::Log) - .with_destination("out", DataType::Log) + .with_source("in", DataType::EventD) + .with_transform("one", DataType::EventD, DataType::EventD) + .with_transform("two", DataType::EventD, DataType::EventD) + .with_transform("three", DataType::EventD, DataType::EventD) + .with_destination("out", DataType::EventD) .with_edge("in", "one") .with_edge("in", "two") .with_multi_edge(&["one", "two"], "three") @@ -576,14 +576,14 @@ mod test { fn datatype_disjoint_sets() { let mut graph = Graph::default(); graph - .with_source("in", DataType::Log) + .with_source("in", DataType::EventD) .with_destination("out", DataType::Metric) .with_edge("in", "out"); assert_eq!( Err(GraphError::DataTypeMismatch { from_component_output_id: try_into_component_output_id("in").unwrap(), - from_ty: DataType::Log, + from_ty: DataType::EventD, to_component_id: try_into_component_id("out").unwrap(), to_ty: DataType::Metric, }), @@ -595,10 +595,10 @@ mod test { fn datatype_subset_into_superset() { let mut graph = Graph::default(); graph - .with_source("in_log", DataType::Log) + .with_source("in_eventd", DataType::EventD) .with_source("in_metric", DataType::Metric) .with_destination("out", DataType::all_bits()) - .with_multi_edge(&["in_log", "in_metric"], "out"); + .with_multi_edge(&["in_eventd", "in_metric"], "out"); assert_eq!(Ok(()), graph.check_data_types()); } @@ -608,14 +608,14 @@ mod test { let mut graph = Graph::default(); graph .with_source("in", DataType::all_bits()) - .with_transform("log_to_any", DataType::Log, DataType::all_bits()) - .with_transform("any_to_log", DataType::all_bits(), DataType::Log) - .with_destination("out_log", DataType::Log) + .with_transform("eventd_to_any", DataType::EventD, DataType::all_bits()) + .with_transform("any_to_eventd", DataType::all_bits(), DataType::EventD) + .with_destination("out_eventd", DataType::EventD) .with_destination("out_metric", DataType::Metric) - .with_edge("in", "log_to_any") - .with_edge("in", "any_to_log") - .with_multi_edge(&["in", "log_to_any", "any_to_log"], "out_log") - .with_multi_edge(&["in", "log_to_any"], "out_metric"); + .with_edge("in", "eventd_to_any") + .with_edge("in", "any_to_eventd") + .with_multi_edge(&["in", "eventd_to_any", "any_to_eventd"], "out_eventd") + .with_multi_edge(&["in", "eventd_to_any"], "out_metric"); assert_eq!(Ok(()), graph.check_data_types()); } @@ -624,21 +624,21 @@ mod test { fn allows_both_directions_for_metrics() { let mut graph = Graph::default(); graph - .with_source("in_log", DataType::Log) + .with_source("in_eventd", DataType::EventD) .with_source("in_metric", DataType::Metric) - .with_transform("log_to_log", DataType::Log, DataType::Log) + .with_transform("eventd_to_eventd", DataType::EventD, DataType::EventD) .with_transform("metric_to_metric", DataType::Metric, DataType::Metric) .with_transform("any_to_any", DataType::all_bits(), DataType::all_bits()) - .with_transform("any_to_log", DataType::all_bits(), DataType::Log) + .with_transform("any_to_eventd", DataType::all_bits(), DataType::EventD) .with_transform("any_to_metric", DataType::all_bits(), DataType::Metric) - .with_destination("out_log", DataType::Log) + .with_destination("out_eventd", DataType::EventD) .with_destination("out_metric", DataType::Metric) - .with_edge("in_log", "log_to_log") + .with_edge("in_eventd", "eventd_to_eventd") .with_edge("in_metric", "metric_to_metric") - .with_multi_edge(&["log_to_log", "metric_to_metric"], "any_to_any") - .with_edge("any_to_any", "any_to_log") + .with_multi_edge(&["eventd_to_eventd", "metric_to_metric"], "any_to_any") + .with_edge("any_to_any", "any_to_eventd") .with_edge("any_to_any", "any_to_metric") - .with_edge("any_to_log", "out_log") + .with_edge("any_to_eventd", "out_eventd") .with_edge("any_to_metric", "out_metric"); assert_eq!(Ok(()), graph.check_data_types()); diff --git a/lib/saluki-core/src/topology/interconnect/forwarder.rs b/lib/saluki-core/src/topology/interconnect/forwarder.rs index 4765c3a5..41de83b8 100644 --- a/lib/saluki-core/src/topology/interconnect/forwarder.rs +++ b/lib/saluki-core/src/topology/interconnect/forwarder.rs @@ -214,7 +214,7 @@ mod tests { let forwarded_metric = forwarded_ebuf .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric.context(), metric.context()); } @@ -242,7 +242,7 @@ mod tests { let forwarded_metric = forwarded_ebuf .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric.context(), metric.context()); } @@ -274,14 +274,14 @@ mod tests { let forwarded_metric1 = forwarded_ebuf1 .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric1.context(), metric.context()); let forwarded_metric2 = forwarded_ebuf2 .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric2.context(), metric.context()); } @@ -313,14 +313,14 @@ mod tests { let forwarded_metric1 = forwarded_ebuf1 .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric1.context(), metric.context()); let forwarded_metric2 = forwarded_ebuf2 .into_iter() .next() - .and_then(|event| event.into_metric()) + .and_then(|event| event.try_into_metric()) .expect("should be single metric in the buffer"); assert_eq!(forwarded_metric2.context(), metric.context()); } diff --git a/lib/saluki-event/src/eventd/alert.rs b/lib/saluki-event/src/eventd/alert.rs deleted file mode 100644 index 4e767efb..00000000 --- a/lib/saluki-event/src/eventd/alert.rs +++ /dev/null @@ -1,15 +0,0 @@ -/// Event alert type -#[derive(Clone, Debug)] -pub enum EventAlertType { - /// Indicates an informational event. - Info, - - /// Indicates an error event. - Error, - - /// Indicates a warning event. - Warning, - - /// Indicates a successful event. - Success, -} diff --git a/lib/saluki-event/src/eventd/mod.rs b/lib/saluki-event/src/eventd/mod.rs index a127fa95..7a56d3c2 100644 --- a/lib/saluki-event/src/eventd/mod.rs +++ b/lib/saluki-event/src/eventd/mod.rs @@ -1,9 +1,33 @@ -//! Event types -mod priority; -pub use self::priority::*; +//! Events. -mod alert; -pub use self::alert::*; +// TODO: Switch usages of `String` to `MetaString` since we should generally be able to intern these strings as they +// originate in in the DogStatsD codec, where interning is already taking place. + +/// Alert type. +#[derive(Clone, Copy, Debug)] +pub enum AlertType { + /// Indicates an informational event. + Info, + + /// Indicates an error event. + Error, + + /// Indicates a warning event. + Warning, + + /// Indicates a successful event. + Success, +} + +/// Event priority. +#[derive(Clone, Copy, Debug)] +pub enum Priority { + /// The event has normal priority. + Normal, + + /// The event has low priority. + Low, +} /// EventD is an object that can be posted to the DataDog event stream. #[derive(Clone, Debug)] @@ -13,55 +37,57 @@ pub struct EventD { timestamp: u64, host: String, aggregation_key: String, - priority: EventPriority, + priority: Priority, source_type_name: String, - alert_type: EventAlertType, + alert_type: AlertType, tags: Vec, } impl EventD { - /// Gets a reference to the title. + /// Returns the title of the event. pub fn title(&self) -> &str { &self.title } - /// Gets a reference to the text. + /// Returns the text of the event. pub fn text(&self) -> &str { &self.text } - /// Gets a reference to the host. + /// Returns the host where the event originated from. pub fn host(&self) -> &str { &self.host } - /// Gets a reference to the aggregation key. + /// Returns the aggregation key of the event. pub fn aggregation_key(&self) -> &str { &self.aggregation_key } - /// Gets a reference to the priority. - pub fn priority(&self) -> &EventPriority { - &self.priority + /// Returns the priority of the event. + pub fn priority(&self) -> Priority { + self.priority } - /// Gets a reference to the source type name. + /// Returns the source type name of the event. pub fn source_type_name(&self) -> &str { &self.source_type_name } - /// Gets a reference to the alert type - pub fn alert_type(&self) -> &EventAlertType { - &self.alert_type + /// Returns the alert type of the event. + pub fn alert_type(&self) -> AlertType { + self.alert_type } - /// Gets a reference to the timestamp. - pub fn timestamp(&self) -> &u64 { - &self.timestamp + /// Returns the timestamp of the event. + /// + /// This is a Unix timestamp, or the number of seconds since the Unix epoch. + pub fn timestamp(&self) -> u64 { + self.timestamp } - /// Gets a reference to the tags. - pub fn tags(&self) -> &Vec { + /// Returns the tags associated with the event. + pub fn tags(&self) -> &[String] { &self.tags } } diff --git a/lib/saluki-event/src/eventd/priority.rs b/lib/saluki-event/src/eventd/priority.rs deleted file mode 100644 index 394d3075..00000000 --- a/lib/saluki-event/src/eventd/priority.rs +++ /dev/null @@ -1,9 +0,0 @@ -/// Event priority -#[derive(Clone, Debug)] -pub enum EventPriority { - /// The event has normal priority. - Normal, - - /// The event has low priority. - Low, -} diff --git a/lib/saluki-event/src/lib.rs b/lib/saluki-event/src/lib.rs index 346046bf..389eef91 100644 --- a/lib/saluki-event/src/lib.rs +++ b/lib/saluki-event/src/lib.rs @@ -25,11 +25,11 @@ pub enum DataType { /// Metrics. Metric, - /// Logs. - Log, + /// Datadog Events. + EventD, - /// Traces. - Trace, + /// Service checks. + ServiceCheck, } impl Default for DataType { @@ -46,12 +46,12 @@ impl fmt::Display for DataType { types.push("Metric"); } - if self.contains(Self::Log) { - types.push("Log"); + if self.contains(Self::EventD) { + types.push("DatadogEvent"); } - if self.contains(Self::Trace) { - types.push("Trace"); + if self.contains(Self::ServiceCheck) { + types.push("ServiceCheck"); } write!(f, "{}", types.join("|")) @@ -64,7 +64,7 @@ pub enum Event { /// A metric. Metric(Metric), - /// An event. + /// A Datadog Event. EventD(EventD), /// A service check. @@ -72,40 +72,40 @@ pub enum Event { } impl Event { - /// Converts this event into `Metric`. + /// Returns the inner event value, if this event is a `Metric`. /// - /// If the underlying event is not a `Metric`, this will return `None`. - pub fn into_metric(self) -> Option { + /// Otherwise, `None` is returned and the original event is consumed. + pub fn try_into_metric(self) -> Option { match self { Event::Metric(metric) => Some(metric), _ => None, } } - /// Converts this event into `Metric`. + /// Returns a mutable reference inner event value, if this event is a `Metric`. /// - /// If the underlying event is not a `Metric`, this will return `None`. - pub fn as_metric_mut(&mut self) -> Option<&mut Metric> { + /// Otherwise, `None` is returned. + pub fn try_as_metric_mut(&mut self) -> Option<&mut Metric> { match self { Event::Metric(metric) => Some(metric), _ => None, } } - /// Converts this event into `Eventd`. + /// Returns the inner event value, if this event is a `EventD`. /// - /// If the underlying event is not a `Eventd`, this will return `None`. - pub fn into_eventd(self) -> Option { + /// Otherwise, `None` is returned and the original event is consumed. + pub fn try_into_eventd(self) -> Option { match self { Event::EventD(eventd) => Some(eventd), _ => None, } } - /// Converts this event into `ServiceCheck`. + /// Returns the inner event value, if this event is a `ServiceCheck`. /// - /// If the underlying event is not a `Eventd`, this will return `None`. - pub fn into_service_check(self) -> Option { + /// Otherwise, `None` is returned and the original event is consumed. + pub fn try_into_service_check(self) -> Option { match self { Event::ServiceCheck(service_check) => Some(service_check), _ => None, diff --git a/lib/saluki-event/src/service_check/mod.rs b/lib/saluki-event/src/service_check/mod.rs index a009a47b..5daf57b1 100644 --- a/lib/saluki-event/src/service_check/mod.rs +++ b/lib/saluki-event/src/service_check/mod.rs @@ -1,12 +1,32 @@ -//! Service Check type -mod status; -pub use self::status::*; +//! Service checks. -/// ServiceCheck +// TODO: Switch usages of `String` to `MetaString` since we should generally be able to intern these strings as they +// originate in in the DogStatsD codec, where interning is already taking place. + +/// Service status. +#[derive(Clone, Copy, Debug)] +pub enum CheckStatus { + /// The service is operating normally. + Ok, + + /// The service is in a warning state. + Warn, + + /// The service is in a critical state. + Critical, + + /// The service is in an unknown state. + Unknown, +} + +/// 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. #[derive(Clone, Debug)] pub struct ServiceCheck { name: String, - status: ServiceCheckStatus, + status: CheckStatus, timestamp: u64, host: String, message: String, @@ -14,33 +34,35 @@ pub struct ServiceCheck { } impl ServiceCheck { - /// Gets a reference to the service check name - pub fn name(&self) -> &String { + /// Returns the name of the check. + pub fn name(&self) -> &str { &self.name } - /// Gets a reference to the status - pub fn status(&self) -> &ServiceCheckStatus { - &self.status + /// Returns the status of the check. + pub fn status(&self) -> CheckStatus { + self.status } - /// Gets a reference to the timestamp + /// Returns the timestamp of the check. + /// + /// This is a Unix timestamp, or the number of seconds since the Unix epoch. pub fn timestamp(&self) -> u64 { self.timestamp } - /// Gets a reference to the host name - pub fn host(&self) -> &String { + /// Returns the host where the check originated from. + pub fn host(&self) -> &str { &self.host } - /// Gets a reference to the message - pub fn message(&self) -> &String { + /// Returns the message associated with the check. + pub fn message(&self) -> &str { &self.message } - /// Gets a reference to the tags - pub fn tags(&self) -> &Vec { + /// Returns the tags associated with the check. + pub fn tags(&self) -> &[String] { &self.tags } } diff --git a/lib/saluki-event/src/service_check/status.rs b/lib/saluki-event/src/service_check/status.rs deleted file mode 100644 index 79c808e1..00000000 --- a/lib/saluki-event/src/service_check/status.rs +++ /dev/null @@ -1,15 +0,0 @@ -/// Service status -#[derive(Clone, Debug)] -pub enum ServiceCheckStatus { - /// The service is operating normally. - Ok, - - /// The service is in a warning state. - Warn, - - /// The service is in a critical state. - Critical, - - /// The service is in an unknown state. - Unknown, -}