#[non_exhaustive]pub struct Service {
pub name: String,
pub id: String,
pub split: Option<TrafficSplit>,
pub labels: HashMap<String, String>,
pub network_settings: Option<NetworkSettings>,
/* private fields */
}Expand description
A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that 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.name: StringFull path to the Service resource in the API.
Example: apps/myapp/services/default.
@OutputOnly
id: StringRelative name of the service within the application.
Example: default.
@OutputOnly
split: Option<TrafficSplit>Mapping that defines fractional HTTP traffic diversion to different versions within the service.
labels: HashMap<String, String>A set of labels to apply to this service. Labels are key/value pairs that describe the service and all resources that belong to it (e.g., versions). The labels can be used to search and group resources, and are propagated to the usage and billing reports, enabling fine-grain analysis of costs. An example of using labels is to tag resources belonging to different environments (e.g., “env=prod”, “env=qa”).
network_settings: Option<NetworkSettings>Ingress settings for this service. Will apply to all versions.
Implementations§
Source§impl Service
impl Service
pub fn new() -> Self
Sourcepub fn set_split<T>(self, v: T) -> Selfwhere
T: Into<TrafficSplit>,
pub fn set_split<T>(self, v: T) -> Selfwhere
T: Into<TrafficSplit>,
Sets the value of split.
Sourcepub fn set_or_clear_split<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrafficSplit>,
pub fn set_or_clear_split<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrafficSplit>,
Sets or clears the value of split.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_network_settings<T>(self, v: T) -> Selfwhere
T: Into<NetworkSettings>,
pub fn set_network_settings<T>(self, v: T) -> Selfwhere
T: Into<NetworkSettings>,
Sets the value of network_settings.
Sourcepub fn set_or_clear_network_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkSettings>,
pub fn set_or_clear_network_settings<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkSettings>,
Sets or clears the value of network_settings.