Class: Temporalio::Client::Connection::KeepAliveOptions

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

Overview

Keep-alive options for client connections. For most users, the default is preferred.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ KeepAliveOptions

Returns a new instance of KeepAliveOptions.



100
101
102
103
104
105
# File 'lib/temporalio/client/connection.rb', line 100

def initialize(**kwargs)
  # @type var kwargs: untyped
  kwargs[:interval] = 30.0 unless kwargs.key?(:interval)
  kwargs[:timeout] = 15.0 unless kwargs.key?(:timeout)
  super
end

Instance Attribute Details

#intervalFloat

Returns Interval to send HTTP2 keep alive pings, default 30.0.

Returns:

  • (Float)

    Interval to send HTTP2 keep alive pings, default 30.0.



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/temporalio/client/connection.rb', line 95

KeepAliveOptions = Struct.new(
  :interval,
  :timeout,
  keyword_init: true
) do
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:interval] = 30.0 unless kwargs.key?(:interval)
    kwargs[:timeout] = 15.0 unless kwargs.key?(:timeout)
    super
  end
end

#timeoutFloat

Returns Timeout that the keep alive must be responded to within or the connection will be closed, default 15.0.

Returns:

  • (Float)

    Timeout that the keep alive must be responded to within or the connection will be closed, default 15.0.



95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/temporalio/client/connection.rb', line 95

KeepAliveOptions = Struct.new(
  :interval,
  :timeout,
  keyword_init: true
) do
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:interval] = 30.0 unless kwargs.key?(:interval)
    kwargs[:timeout] = 15.0 unless kwargs.key?(:timeout)
    super
  end
end