Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
feat: add RPC retry information for MacSign, MacVerify, and GenerateR…
Browse files Browse the repository at this point in the history
…andomBytes (#186)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 399925901

Source-Link: googleapis/googleapis@ae7e399

Source-Link: googleapis/googleapis-gen@3a81285
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2E4MTI4NTI4Y2VkZGJhMGMxNzc1NDAxZWVmNTdlY2I1ODJkYjM1MCJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 30, 2021
1 parent 92908af commit 62591c8
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 6 deletions.
Expand Up @@ -2628,7 +2628,17 @@ async def mac_sign(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.mac_sign,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -2724,7 +2734,17 @@ async def mac_verify(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.mac_verify,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -2822,7 +2842,17 @@ async def generate_random_bytes(
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.generate_random_bytes,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
Expand Up @@ -484,14 +484,48 @@ def _prep_wrapped_messages(self, client_info):
client_info=client_info,
),
self.mac_sign: gapic_v1.method.wrap_method(
self.mac_sign, default_timeout=None, client_info=client_info,
self.mac_sign,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.mac_verify: gapic_v1.method.wrap_method(
self.mac_verify, default_timeout=None, client_info=client_info,
self.mac_verify,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.generate_random_bytes: gapic_v1.method.wrap_method(
self.generate_random_bytes,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
}
Expand Down

0 comments on commit 62591c8

Please sign in to comment.