Class: Google::Apis::NetworkservicesV1beta1::GrpcRouteRetryPolicy

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

The specifications for retries.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GrpcRouteRetryPolicy

Returns a new instance of GrpcRouteRetryPolicy.



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

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

Instance Attribute Details

#num_retriesFixnum

Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1. Corresponds to the JSON property numRetries

Returns:

  • (Fixnum)


985
986
987
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 985

def num_retries
  @num_retries
end

#retry_conditionsArray<String>

  • connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource- exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable Corresponds to the JSON property retryConditions

Returns:

  • (Array<String>)


999
1000
1001
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 999

def retry_conditions
  @retry_conditions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1006
1007
1008
1009
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1006

def update!(**args)
  @num_retries = args[:num_retries] if args.key?(:num_retries)
  @retry_conditions = args[:retry_conditions] if args.key?(:retry_conditions)
end