#[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
Sourcepub fn set_split<T>(self, v: T) -> Selfwhere
T: Into<TrafficSplit>,
pub fn set_split<T>(self, v: T) -> Selfwhere
T: Into<TrafficSplit>,
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>,
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
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.
§Example
use google_cloud_appengine_v1::model::NetworkSettings;
let x = Service::new().set_network_settings(NetworkSettings::default()/* use setters */);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.
§Example
use google_cloud_appengine_v1::model::NetworkSettings;
let x = Service::new().set_or_clear_network_settings(Some(NetworkSettings::default()/* use setters */));
let x = Service::new().set_or_clear_network_settings(None::<NetworkSettings>);Trait Implementations§
impl StructuralPartialEq for Service
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
impl UnwindSafe for Service
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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