lib/ldclient-rb/config.rb in launchdarkly-server-sdk-6.3.1 vs lib/ldclient-rb/config.rb in launchdarkly-server-sdk-6.3.2

- old
+ new

@@ -19,10 +19,11 @@ # @option opts [String] :stream_uri ("https://stream.launchdarkly.com") See {#stream_uri}. # @option opts [String] :events_uri ("https://events.launchdarkly.com") See {#events_uri}. # @option opts [Integer] :capacity (10000) See {#capacity}. # @option opts [Float] :flush_interval (30) See {#flush_interval}. # @option opts [Float] :read_timeout (10) See {#read_timeout}. + # @option opts [Float] :initial_reconnect_delay (1) See {#initial_reconnect_delay}. # @option opts [Float] :connect_timeout (2) See {#connect_timeout}. # @option opts [Object] :cache_store See {#cache_store}. # @option opts [Object] :feature_store See {#feature_store}. # @option opts [Boolean] :use_ldd (false) See {#use_ldd?}. # @option opts [Boolean] :offline (false) See {#offline?}. @@ -52,10 +53,11 @@ @logger = opts[:logger] || Config.default_logger @cache_store = opts[:cache_store] || Config.default_cache_store @flush_interval = opts[:flush_interval] || Config.default_flush_interval @connect_timeout = opts[:connect_timeout] || Config.default_connect_timeout @read_timeout = opts[:read_timeout] || Config.default_read_timeout + @initial_reconnect_delay = opts[:initial_reconnect_delay] || Config.default_initial_reconnect_delay @feature_store = opts[:feature_store] || Config.default_feature_store @stream = opts.has_key?(:stream) ? opts[:stream] : Config.default_stream @use_ldd = opts.has_key?(:use_ldd) ? opts[:use_ldd] : Config.default_use_ldd @offline = opts.has_key?(:offline) ? opts[:offline] : Config.default_offline @poll_interval = opts.has_key?(:poll_interval) && opts[:poll_interval] > Config.default_poll_interval ? opts[:poll_interval] : Config.default_poll_interval @@ -179,10 +181,17 @@ # @return [Float] # attr_reader :read_timeout # + # The initial delay before reconnecting after an error in the SSE client. + # This only applies to the streaming connection. + # @return [Float] + # + attr_reader :initial_reconnect_delay + + # # The connect timeout for network connections in seconds. # @return [Float] # attr_reader :connect_timeout @@ -391,9 +400,17 @@ # The default value for {#read_timeout}. # @return [Float] 10 # def self.default_read_timeout 10 + end + + # + # The default value for {#initial_reconnect_delay}. + # @return [Float] 1 + # + def self.default_initial_reconnect_delay + 1 end # # The default value for {#connect_timeout}. # @return [Float] 10