Class: Google::Apis::NetworkservicesV1beta1::GrpcRouteRouteAction

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1beta1/classes.rb,
lib/google/apis/networkservices_v1beta1/representations.rb,
lib/google/apis/networkservices_v1beta1/representations.rb

Overview

Specifies how to route matched traffic.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GrpcRouteRouteAction

Returns a new instance of GrpcRouteRouteAction.



1022
1023
1024
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1022

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#destinationsArray<Google::Apis::NetworkservicesV1beta1::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



987
988
989
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 987

def destinations
  @destinations
end

#fault_injection_policyGoogle::Apis::NetworkservicesV1beta1::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



997
998
999
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 997

def fault_injection_policy
  @fault_injection_policy
end

#retry_policyGoogle::Apis::NetworkservicesV1beta1::GrpcRouteRetryPolicy

The specifications for retries. Corresponds to the JSON property retryPolicy



1002
1003
1004
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1002

def retry_policy
  @retry_policy
end

#stateful_session_affinityGoogle::Apis::NetworkservicesV1beta1::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



1013
1014
1015
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1013

def stateful_session_affinity
  @stateful_session_affinity
end

#timeoutString

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

Returns:

  • (String)


1020
1021
1022
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1020

def timeout
  @timeout
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1027
1028
1029
1030
1031
1032
1033
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1027

def update!(**args)
  @destinations = args[:destinations] if args.key?(:destinations)
  @fault_injection_policy = args[:fault_injection_policy] if args.key?(:fault_injection_policy)
  @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