Google Cloud Network Services V1 Client - Class RetryPolicy (0.1.1)

Reference documentation and code samples for the Google Cloud Network Services V1 Client class RetryPolicy.

The specifications for retries.

Generated from protobuf message google.cloud.networkservices.v1.GrpcRoute.RetryPolicy

Namespace

Google \ Cloud \ NetworkServices \ V1 \ GrpcRoute

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ retry_conditions array
  • 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
↳ num_retries int

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

getRetryConditions

  • 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
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRetryConditions

  • 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
Parameter
Name Description
var string[]
Returns
Type Description
$this

getNumRetries

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

Returns
Type Description
int

setNumRetries

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

Parameter
Name Description
var int
Returns
Type Description
$this