Class: Temporalio::Client::RPCOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/client.rb

Overview

Set of RPC options for RPC calls.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil, timeout: nil, cancellation: nil, override_retry: nil) ⇒ RPCOptions

Create RPC options.

Parameters:

  • metadata (Hash<String, String>, nil) (defaults to: nil)

    Headers to include on the RPC call.

  • timeout (Float, nil) (defaults to: nil)

    Number of seconds before timeout of the RPC call.

  • cancellation (Cancellation, nil) (defaults to: nil)

    Cancellation to use to potentially cancel the call. If canceled, the RPC will return Error::CanceledError.

  • override_retry (Boolean, nil) (defaults to: nil)

    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.



612
613
614
615
616
617
618
619
620
621
622
# File 'lib/temporalio/client.rb', line 612

def initialize(
  metadata: nil,
  timeout: nil,
  cancellation: nil,
  override_retry: nil
)
  @metadata = 
  @timeout = timeout
  @cancellation = cancellation
  @override_retry = override_retry
end

Instance Attribute Details

#cancellationCancellation?

Returns Cancellation to use to potentially cancel the call. If canceled, the RPC will return Error::CanceledError.

Returns:



596
597
598
# File 'lib/temporalio/client.rb', line 596

def cancellation
  @cancellation
end

#metadataHash<String, String>?

Returns Headers to include on the RPC call.

Returns:

  • (Hash<String, String>, nil)

    Headers to include on the RPC call.



589
590
591
# File 'lib/temporalio/client.rb', line 589

def 
  @metadata
end

#override_retryBoolean?

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.

Returns:

  • (Boolean, nil)

    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.



601
602
603
# File 'lib/temporalio/client.rb', line 601

def override_retry
  @override_retry
end

#timeoutFloat?

Returns Number of seconds before timeout of the RPC call.

Returns:

  • (Float, nil)

    Number of seconds before timeout of the RPC call.



592
593
594
# File 'lib/temporalio/client.rb', line 592

def timeout
  @timeout
end