#[non_exhaustive]pub struct ServiceLevelObjective {
pub name: String,
pub display_name: String,
pub service_level_indicator: Option<ServiceLevelIndicator>,
pub goal: f64,
pub user_labels: HashMap<String, String>,
pub period: Option<Period>,
/* private fields */
}Expand description
A Service-Level Objective (SLO) describes a level of desired good service. It consists of a service-level indicator (SLI), a performance goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include “99% of requests in each rolling week have latency below 200 milliseconds” or “99.5% of requests in each calendar month return successfully.”
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. Resource name for this ServiceLevelObjective. The format is:
projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME]display_name: StringName used for UI elements listing this SLO.
service_level_indicator: Option<ServiceLevelIndicator>The definition of good service, used to measure and calculate the quality
of the Service’s performance with respect to a single aspect of service
quality.
goal: f64The fraction of service that must be good in order for this objective to be
met. 0 < goal <= 0.9999.
user_labels: HashMap<String, String>Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.
period: Option<Period>The time period over which the objective will be evaluated.
Implementations§
Source§impl ServiceLevelObjective
impl ServiceLevelObjective
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_service_level_indicator<T>(self, v: T) -> Selfwhere
T: Into<ServiceLevelIndicator>,
pub fn set_service_level_indicator<T>(self, v: T) -> Selfwhere
T: Into<ServiceLevelIndicator>,
Sets the value of service_level_indicator.
Sourcepub fn set_or_clear_service_level_indicator<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceLevelIndicator>,
pub fn set_or_clear_service_level_indicator<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceLevelIndicator>,
Sets or clears the value of service_level_indicator.
Sourcepub fn set_user_labels<T, K, V>(self, v: T) -> Self
pub fn set_user_labels<T, K, V>(self, v: T) -> Self
Sets the value of user_labels.
Sourcepub fn set_period<T: Into<Option<Period>>>(self, v: T) -> Self
pub fn set_period<T: Into<Option<Period>>>(self, v: T) -> Self
Sets the value of period.
Note that all the setters affecting period are mutually
exclusive.
Sourcepub fn rolling_period(&self) -> Option<&Box<Duration>>
pub fn rolling_period(&self) -> Option<&Box<Duration>>
The value of period
if it holds a RollingPeriod, None if the field is not set or
holds a different branch.
Sourcepub fn set_rolling_period<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_rolling_period<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of period
to hold a RollingPeriod.
Note that all the setters affecting period are
mutually exclusive.
Sourcepub fn calendar_period(&self) -> Option<&CalendarPeriod>
pub fn calendar_period(&self) -> Option<&CalendarPeriod>
The value of period
if it holds a CalendarPeriod, None if the field is not set or
holds a different branch.
Sourcepub fn set_calendar_period<T: Into<CalendarPeriod>>(self, v: T) -> Self
pub fn set_calendar_period<T: Into<CalendarPeriod>>(self, v: T) -> Self
Sets the value of period
to hold a CalendarPeriod.
Note that all the setters affecting period are
mutually exclusive.
Trait Implementations§
Source§impl Clone for ServiceLevelObjective
impl Clone for ServiceLevelObjective
Source§fn clone(&self) -> ServiceLevelObjective
fn clone(&self) -> ServiceLevelObjective
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more