#[non_exhaustive]pub struct AppEngineRouting {
pub service: String,
pub version: String,
pub instance: String,
pub host: String,
/* private fields */
}Expand description
App Engine Routing.
For more information about services, versions, and instances see An Overview of App Engine, Microservices Architecture on Google App Engine, App Engine Standard request routing, and App Engine Flex request routing.
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.service: StringApp service.
By default, the job is sent to the service which is the default service when the job is attempted.
version: StringApp version.
By default, the job is sent to the version which is the default version when the job is attempted.
instance: StringApp instance.
By default, the job is sent to an instance which is available when the job is attempted.
Requests can only be sent to a specific instance if manual scaling is used in App Engine Standard. App Engine Flex does not support instances. For more information, see App Engine Standard request routing and App Engine Flex request routing.
host: StringOutput only. The host that the job is sent to.
For more information about how App Engine requests are routed, see here.
The host is constructed as:
-
host = [application_domain_name]</br>| [service] + '.' + [application_domain_name]</br>| [version] + '.' + [application_domain_name]</br>| [version_dot_service]+ '.' + [application_domain_name]</br>| [instance] + '.' + [application_domain_name]</br>| [instance_dot_service] + '.' + [application_domain_name]</br>| [instance_dot_version] + '.' + [application_domain_name]</br>| [instance_dot_version_dot_service] + '.' + [application_domain_name] -
application_domain_name= The domain name of the app, for example <app-id>.appspot.com, which is associated with the job’s project ID. -
service =service -
version =version -
instance =instance -
instance_dot_version_dot_service =instance+ '.' +version+ '.' +service
If service is empty, then the job will be sent to the service which is the default service when the job is attempted.
If version is empty, then the job will be sent to the version which is the default version when the job is attempted.
If instance is empty, then the job will be sent to an instance which is available when the job is attempted.
If service, version, or instance is invalid, then the job will be sent to the default version of the default service when the job is attempted.
Implementations§
Source§impl AppEngineRouting
impl AppEngineRouting
pub fn new() -> Self
Sourcepub fn set_service<T: Into<String>>(self, v: T) -> Self
pub fn set_service<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_instance<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for AppEngineRouting
impl Clone for AppEngineRouting
Source§fn clone(&self) -> AppEngineRouting
fn clone(&self) -> AppEngineRouting
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more