Class: LaunchDarkly::Impl::DataSystem::StreamingDataSourceBuilder Private

Inherits:
Object
  • Object
show all
Includes:
DataSourceBuilderCommon
Defined in:
lib/ldclient-rb/impl/data_system/streaming.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Builder for a StreamingDataSource.

Since:

  • 5.5.0

Constant Summary collapse

DEFAULT_BASE_URI =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0

"https://stream.launchdarkly.com"
DEFAULT_INITIAL_RECONNECT_DELAY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0

1

Instance Method Summary collapse

Methods included from DataSourceBuilderCommon

#base_uri, #connect_timeout, #read_timeout, #socket_factory

Constructor Details

#initializeStreamingDataSourceBuilder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of StreamingDataSourceBuilder.

Since:

  • 5.5.0



368
369
370
# File 'lib/ldclient-rb/impl/data_system/streaming.rb', line 368

def initialize
  # No initialization needed - defaults applied in build via nil-check
end

Instance Method Details

#build(sdk_key, config) ⇒ StreamingDataSource

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds the StreamingDataSource with the configured parameters.

Parameters:

Returns:

Since:

  • 5.5.0



390
391
392
393
394
395
396
397
# File 'lib/ldclient-rb/impl/data_system/streaming.rb', line 390

def build(sdk_key, config)
  http_opts = build_http_config
  StreamingDataSource.new(
    sdk_key, http_opts,
    @initial_reconnect_delay || DEFAULT_INITIAL_RECONNECT_DELAY,
    config
  )
end

#initial_reconnect_delay(delay) ⇒ StreamingDataSourceBuilder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Sets the initial delay before reconnecting after an error.

Parameters:

  • delay (Float)

    Delay in seconds

Returns:

Since:

  • 5.5.0



378
379
380
381
# File 'lib/ldclient-rb/impl/data_system/streaming.rb', line 378

def initial_reconnect_delay(delay)
  @initial_reconnect_delay = delay
  self
end