Class: LaunchDarkly::Impl::DataSystem::PollingDataSourceBuilder Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSystem::PollingDataSourceBuilder
- Includes:
- DataSourceBuilderCommon
- Defined in:
- lib/ldclient-rb/impl/data_system/polling.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 PollingDataSource.
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.
"https://sdk.launchdarkly.com"- DEFAULT_POLL_INTERVAL =
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.
30
Instance Method Summary collapse
-
#build(sdk_key, config) ⇒ PollingDataSource
private
Builds the PollingDataSource with the configured parameters.
-
#initialize ⇒ PollingDataSourceBuilder
constructor
private
A new instance of PollingDataSourceBuilder.
-
#poll_interval(secs) ⇒ PollingDataSourceBuilder
private
Sets the polling interval in seconds.
-
#requester(requester) ⇒ PollingDataSourceBuilder
private
Sets a custom Requester for the PollingDataSource.
Methods included from DataSourceBuilderCommon
#base_uri, #connect_timeout, #read_timeout, #socket_factory
Constructor Details
#initialize ⇒ PollingDataSourceBuilder
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 PollingDataSourceBuilder.
538 539 540 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 538 def initialize @requester = nil end |
Instance Method Details
#build(sdk_key, config) ⇒ PollingDataSource
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 PollingDataSource with the configured parameters.
571 572 573 574 575 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 571 def build(sdk_key, config) http_opts = build_http_config requester = @requester || HTTPPollingRequester.new(sdk_key, http_opts, config) PollingDataSource.new(@poll_interval || DEFAULT_POLL_INTERVAL, requester, config.logger) end |
#poll_interval(secs) ⇒ PollingDataSourceBuilder
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 polling interval in seconds.
548 549 550 551 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 548 def poll_interval(secs) @poll_interval = secs self end |
#requester(requester) ⇒ PollingDataSourceBuilder
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 a custom Requester for the PollingDataSource.
559 560 561 562 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 559 def requester(requester) @requester = requester self end |