#[non_exhaustive]pub struct BasicSli {
pub method: Vec<String>,
pub location: Vec<String>,
pub version: Vec<String>,
pub sli_criteria: Option<SliCriteria>,
}Expand description
An SLI measuring performance on a well-known service type. Performance will
be computed on the basis of pre-defined metrics. The type of the
service_resource determines the metrics to use and the
service_resource.labels and metric_labels are used to construct a
monitoring filter to filter that metric down to just the data relevant to
this service.
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.method: Vec<String>OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service’s methods. For service types that don’t support breaking down by method, setting this field will result in an error.
location: Vec<String>OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don’t support breaking down by location, setting this field will result in an error.
version: Vec<String>OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don’t support breaking down by version, setting this field will result in an error.
sli_criteria: Option<SliCriteria>This SLI can be evaluated on the basis of availability or latency.
Implementations§
Source§impl BasicSli
impl BasicSli
Sourcepub fn set_method<T, V>(self, v: T) -> Self
pub fn set_method<T, V>(self, v: T) -> Self
Sets the value of method.
Sourcepub fn set_location<T, V>(self, v: T) -> Self
pub fn set_location<T, V>(self, v: T) -> Self
Sets the value of location.
Sourcepub fn set_version<T, V>(self, v: T) -> Self
pub fn set_version<T, V>(self, v: T) -> Self
Sets the value of version.
Sourcepub fn set_sli_criteria<T: Into<Option<SliCriteria>>>(self, v: T) -> Self
pub fn set_sli_criteria<T: Into<Option<SliCriteria>>>(self, v: T) -> Self
Sets the value of sli_criteria.
Sourcepub fn get_availability(&self) -> Option<&Box<AvailabilityCriteria>>
pub fn get_availability(&self) -> Option<&Box<AvailabilityCriteria>>
The value of sli_criteria
if it holds a Availability, None if the field is not set or
holds a different branch.
Sourcepub fn get_latency(&self) -> Option<&Box<LatencyCriteria>>
pub fn get_latency(&self) -> Option<&Box<LatencyCriteria>>
The value of sli_criteria
if it holds a Latency, None if the field is not set or
holds a different branch.
Sourcepub fn set_availability<T: Into<Box<AvailabilityCriteria>>>(self, v: T) -> Self
pub fn set_availability<T: Into<Box<AvailabilityCriteria>>>(self, v: T) -> Self
Sets the value of sli_criteria
to hold a Availability.
Note that all the setters affecting sli_criteria are
mutually exclusive.
Sourcepub fn set_latency<T: Into<Box<LatencyCriteria>>>(self, v: T) -> Self
pub fn set_latency<T: Into<Box<LatencyCriteria>>>(self, v: T) -> Self
Sets the value of sli_criteria
to hold a Latency.
Note that all the setters affecting sli_criteria are
mutually exclusive.