Class: Google::Apis::NetworkservicesV1::GrpcRouteRouteAction
- Inherits:
-
Object
- Object
- Google::Apis::NetworkservicesV1::GrpcRouteRouteAction
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/networkservices_v1/classes.rb,
lib/google/apis/networkservices_v1/representations.rb,
lib/google/apis/networkservices_v1/representations.rb
Overview
Specifies how to route matched traffic.
Instance Attribute Summary collapse
-
#destinations ⇒ Array<Google::Apis::NetworkservicesV1::GrpcRouteDestination>
Optional.
-
#fault_injection_policy ⇒ Google::Apis::NetworkservicesV1::GrpcRouteFaultInjectionPolicy
The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure.
-
#idle_timeout ⇒ String
Optional.
-
#retry_policy ⇒ Google::Apis::NetworkservicesV1::GrpcRouteRetryPolicy
The specifications for retries.
-
#stateful_session_affinity ⇒ Google::Apis::NetworkservicesV1::GrpcRouteStatefulSessionAffinityPolicy
The specification for cookie-based stateful session affinity where the date plane supplies a “session cookie” with the name "GSSA" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy.
-
#timeout ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GrpcRouteRouteAction
constructor
A new instance of GrpcRouteRouteAction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GrpcRouteRouteAction
Returns a new instance of GrpcRouteRouteAction.
1139 1140 1141 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1139 def initialize(**args) update!(**args) end |
Instance Attribute Details
#destinations ⇒ Array<Google::Apis::NetworkservicesV1::GrpcRouteDestination>
Optional. The destination services to which traffic should be forwarded. If
multiple destinations are specified, traffic will be split between Backend
Service(s) according to the weight field of these destinations.
Corresponds to the JSON property destinations
1095 1096 1097 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1095 def destinations @destinations end |
#fault_injection_policy ⇒ Google::Apis::NetworkservicesV1::GrpcRouteFaultInjectionPolicy
The specification for fault injection introduced into traffic to test the
resiliency of clients to destination service failure. As part of fault
injection, when clients send requests to a destination, delays can be
introduced on a percentage of requests before sending those requests to the
destination service. Similarly requests from clients can be aborted by for a
percentage of requests.
Corresponds to the JSON property faultInjectionPolicy
1105 1106 1107 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1105 def fault_injection_policy @fault_injection_policy end |
#idle_timeout ⇒ String
Optional. Specifies the idle timeout for the selected route. The idle timeout
is defined as the period in which there are no bytes sent or received on
either the upstream or downstream connection. If not set, the default idle
timeout is 1 hour. If set to 0s, the timeout will be disabled.
Corresponds to the JSON property idleTimeout
1113 1114 1115 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1113 def idle_timeout @idle_timeout end |
#retry_policy ⇒ Google::Apis::NetworkservicesV1::GrpcRouteRetryPolicy
The specifications for retries. Specifies one or more conditions for which
this retry rule applies. Valid values are:
Corresponds to the JSON property retryPolicy
1119 1120 1121 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1119 def retry_policy @retry_policy end |
#stateful_session_affinity ⇒ Google::Apis::NetworkservicesV1::GrpcRouteStatefulSessionAffinityPolicy
The specification for cookie-based stateful session affinity where the date
plane supplies a “session cookie” with the name "GSSA" which encodes a
specific destination host and each request containing that cookie will be
directed to that host as long as the destination host remains up and healthy.
The gRPC proxyless mesh library or sidecar proxy will manage the session
cookie but the client application code is responsible for copying the cookie
from each RPC in the session to the next.
Corresponds to the JSON property statefulSessionAffinity
1130 1131 1132 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1130 def stateful_session_affinity @stateful_session_affinity end |
#timeout ⇒ String
Optional. Specifies the timeout for selected route. Timeout is computed from
the time the request has been fully processed (i.e. end of stream) up until
the response has been completely processed. Timeout includes all retries.
Corresponds to the JSON property timeout
1137 1138 1139 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1137 def timeout @timeout end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1144 def update!(**args) @destinations = args[:destinations] if args.key?(:destinations) @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy) @idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout) @retry_policy = args[:retry_policy] if args.key?(:retry_policy) @stateful_session_affinity = args[:stateful_session_affinity] if args.key?(:stateful_session_affinity) @timeout = args[:timeout] if args.key?(:timeout) end |