Class: Prefab::SSEConfigClient::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/prefab/sse_config_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sse_read_timeout: 300, seconds_between_new_connection: 5, sleep_delay_for_new_connection_check: 1, sse_default_reconnect_time: SSE::Client::DEFAULT_RECONNECT_TIME, errors_to_close_connection: [HTTP::ConnectionError]) ⇒ Options

Returns a new instance of Options.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/prefab/sse_config_client.rb', line 10

def initialize(sse_read_timeout: 300,
               seconds_between_new_connection: 5,
               sleep_delay_for_new_connection_check: 1,
               sse_default_reconnect_time: SSE::Client::DEFAULT_RECONNECT_TIME,
               errors_to_close_connection: [HTTP::ConnectionError])
  @sse_read_timeout = sse_read_timeout
  @seconds_between_new_connection = seconds_between_new_connection
  @sse_default_reconnect_time = sse_default_reconnect_time
  @sleep_delay_for_new_connection_check = sleep_delay_for_new_connection_check
  @errors_to_close_connection = errors_to_close_connection
end

Instance Attribute Details

#errors_to_close_connectionObject (readonly)

Returns the value of attribute errors_to_close_connection.



6
7
8
# File 'lib/prefab/sse_config_client.rb', line 6

def errors_to_close_connection
  @errors_to_close_connection
end

#seconds_between_new_connectionObject (readonly)

Returns the value of attribute seconds_between_new_connection.



6
7
8
# File 'lib/prefab/sse_config_client.rb', line 6

def seconds_between_new_connection
  @seconds_between_new_connection
end

#sleep_delay_for_new_connection_checkObject (readonly)

Returns the value of attribute sleep_delay_for_new_connection_check.



6
7
8
# File 'lib/prefab/sse_config_client.rb', line 6

def sleep_delay_for_new_connection_check
  @sleep_delay_for_new_connection_check
end

#sse_default_reconnect_timeObject (readonly)

Returns the value of attribute sse_default_reconnect_time.



6
7
8
# File 'lib/prefab/sse_config_client.rb', line 6

def sse_default_reconnect_time
  @sse_default_reconnect_time
end

#sse_read_timeoutObject (readonly)

Returns the value of attribute sse_read_timeout.



6
7
8
# File 'lib/prefab/sse_config_client.rb', line 6

def sse_read_timeout
  @sse_read_timeout
end