Class: Temporalio::Client::RPCOptions
- Inherits:
-
Object
- Object
- Temporalio::Client::RPCOptions
- Defined in:
- lib/temporalio/client.rb
Overview
Set of RPC options for RPC calls.
Instance Attribute Summary collapse
-
#cancellation ⇒ Cancellation?
Cancellation to use to potentially cancel the call.
-
#metadata ⇒ Hash<String, String>?
Headers to include on the RPC call.
-
#override_retry ⇒ Boolean?
Whether to override the default retry option which decides whether to retry calls implicitly when known transient error codes are reached.
-
#timeout ⇒ Float?
Number of seconds before timeout of the RPC call.
Instance Method Summary collapse
-
#initialize(metadata: nil, timeout: nil, cancellation: nil, override_retry: nil) ⇒ RPCOptions
constructor
Create RPC options.
Constructor Details
#initialize(metadata: nil, timeout: nil, cancellation: nil, override_retry: nil) ⇒ RPCOptions
Create RPC options.
698 699 700 701 702 703 704 705 706 707 708 |
# File 'lib/temporalio/client.rb', line 698 def initialize( metadata: nil, timeout: nil, cancellation: nil, override_retry: nil ) @metadata = @timeout = timeout @cancellation = cancellation @override_retry = override_retry end |
Instance Attribute Details
#cancellation ⇒ Cancellation?
Returns Cancellation to use to potentially cancel the call. If canceled, the RPC will return Error::CanceledError.
682 683 684 |
# File 'lib/temporalio/client.rb', line 682 def cancellation @cancellation end |
#metadata ⇒ Hash<String, String>?
Returns Headers to include on the RPC call.
675 676 677 |
# File 'lib/temporalio/client.rb', line 675 def @metadata end |
#override_retry ⇒ Boolean?
Returns Whether to override the default retry option which decides whether to retry calls implicitly when known transient error codes are reached. By default when this is nil, high-level calls retry known transient error codes and low-level/direct calls do not.
687 688 689 |
# File 'lib/temporalio/client.rb', line 687 def override_retry @override_retry end |
#timeout ⇒ Float?
Returns Number of seconds before timeout of the RPC call.
678 679 680 |
# File 'lib/temporalio/client.rb', line 678 def timeout @timeout end |