Class: AWSCDK::AppMesh::GrpcRetryPolicy
- Inherits:
-
HttpRetryPolicy
- Object
- HttpRetryPolicy
- AWSCDK::AppMesh::GrpcRetryPolicy
- Defined in:
- app_mesh/grpc_retry_policy.rb
Overview
gRPC retry policy.
Instance Attribute Summary collapse
-
#grpc_retry_events ⇒ Array<AWSCDK::AppMesh::GrpcRetryEvent>?
readonly
gRPC events on which to retry.
-
#http_retry_events ⇒ Array<AWSCDK::AppMesh::HttpRetryEvent>?
readonly
Specify HTTP events on which to retry.
-
#retry_attempts ⇒ Numeric
readonly
The maximum number of retry attempts.
-
#retry_timeout ⇒ AWSCDK::Duration
readonly
The timeout for each retry attempt.
-
#tcp_retry_events ⇒ Array<AWSCDK::AppMesh::TCPRetryEvent>?
readonly
TCP events on which to retry.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil, grpc_retry_events: nil) ⇒ GrpcRetryPolicy
constructor
A new instance of GrpcRetryPolicy.
- #to_jsii ⇒ Object
Constructor Details
#initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil, grpc_retry_events: nil) ⇒ GrpcRetryPolicy
Returns a new instance of GrpcRetryPolicy.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app_mesh/grpc_retry_policy.rb', line 12 def initialize(retry_attempts:, retry_timeout:, http_retry_events: nil, tcp_retry_events: nil, grpc_retry_events: nil) @retry_attempts = retry_attempts Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") @retry_timeout = retry_timeout Jsii::Type.check_type(@retry_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retryTimeout") @http_retry_events = http_retry_events Jsii::Type.check_type(@http_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkh0dHBSZXRyeUV2ZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "httpRetryEvents") unless @http_retry_events.nil? @tcp_retry_events = tcp_retry_events Jsii::Type.check_type(@tcp_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLlRjcFJldHJ5RXZlbnQifSwia2luZCI6ImFycmF5In19")), "tcpRetryEvents") unless @tcp_retry_events.nil? @grpc_retry_events = grpc_retry_events Jsii::Type.check_type(@grpc_retry_events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkdycGNSZXRyeUV2ZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "grpcRetryEvents") unless @grpc_retry_events.nil? end |
Instance Attribute Details
#grpc_retry_events ⇒ Array<AWSCDK::AppMesh::GrpcRetryEvent>? (readonly)
Default: - no retries for gRPC events
gRPC events on which to retry.
You must specify at least one value for at least one types of retry events.
58 59 60 |
# File 'app_mesh/grpc_retry_policy.rb', line 58 def grpc_retry_events @grpc_retry_events end |
#http_retry_events ⇒ Array<AWSCDK::AppMesh::HttpRetryEvent>? (readonly)
Default: - no retries for http events
Specify HTTP events on which to retry.
You must specify at least one value for at least one types of retry events.
40 41 42 |
# File 'app_mesh/grpc_retry_policy.rb', line 40 def http_retry_events @http_retry_events end |
#retry_attempts ⇒ Numeric (readonly)
The maximum number of retry attempts.
28 29 30 |
# File 'app_mesh/grpc_retry_policy.rb', line 28 def retry_attempts @retry_attempts end |
#retry_timeout ⇒ AWSCDK::Duration (readonly)
The timeout for each retry attempt.
32 33 34 |
# File 'app_mesh/grpc_retry_policy.rb', line 32 def retry_timeout @retry_timeout end |
#tcp_retry_events ⇒ Array<AWSCDK::AppMesh::TCPRetryEvent>? (readonly)
Default: - no retries for tcp events
TCP events on which to retry.
The event occurs before any processing of a request has started and is encountered when the upstream is temporarily or permanently unavailable. You must specify at least one value for at least one types of retry events.
50 51 52 |
# File 'app_mesh/grpc_retry_policy.rb', line 50 def tcp_retry_events @tcp_retry_events end |
Class Method Details
.jsii_properties ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'app_mesh/grpc_retry_policy.rb', line 60 def self.jsii_properties { :retry_attempts => "retryAttempts", :retry_timeout => "retryTimeout", :http_retry_events => "httpRetryEvents", :tcp_retry_events => "tcpRetryEvents", :grpc_retry_events => "grpcRetryEvents", } end |
Instance Method Details
#to_jsii ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'app_mesh/grpc_retry_policy.rb', line 70 def to_jsii result = {} result.merge!(super) result.merge!({ "retryAttempts" => @retry_attempts, "retryTimeout" => @retry_timeout, "httpRetryEvents" => @http_retry_events, "tcpRetryEvents" => @tcp_retry_events, "grpcRetryEvents" => @grpc_retry_events, }) result.compact end |