Reference documentation and code samples for the gapic-common class Gapic::CallOptions.
Encapsulates the overridable settings for a particular RPC call.
Inherits
- Object
Methods
#initialize
def initialize(timeout: nil, metadata: nil, retry_policy: nil) -> CallOptions
Create a new Options object instance.
- timeout (Numeric) (defaults to: nil) — The client-side timeout for RPC calls.
- metadata (Hash) (defaults to: nil) — The request header params.
-
retry_policy (Hash, RetryPolicy, Proc) (defaults to: nil) — The policy for error retry. A Hash can be provided to
customize the policy object, using keys that match the arguments for RetryPolicy#initialize.
A Proc object can also be provided. The Proc should accept an error as an argument, and return
true
if the error should be retried orfalse
if not. If the error is to be retried, the Proc object must also block with an incremental delay before returningtrue
.
- (CallOptions) — a new instance of CallOptions
#merge
def merge(**kwargs) -> CallOptions
Return a new CallOptions with the given modifications. The current object is not modified.
- kwargs (keywords) — Updated fields. See #initialize for details.
- (CallOptions) — A new CallOptions object.
#metadata
def metadata() -> Hash
- (Hash)
#retry_policy
def retry_policy() -> RetryPolicy, Object
- (RetryPolicy, Object)
#timeout
def timeout() -> Numeric, nil
- (Numeric, nil)
#to_h
def to_h() -> Hash
Convert to hash form.
- (Hash)