Class: LaunchDarkly::Impl::DataSystem::FDv1PollingDataSourceBuilder Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSystem::FDv1PollingDataSourceBuilder
- 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 an FDv1 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 ⇒ FDv1PollingDataSourceBuilder
constructor
private
A new instance of FDv1PollingDataSourceBuilder.
-
#poll_interval(secs) ⇒ FDv1PollingDataSourceBuilder
private
Sets the polling interval in seconds.
-
#requester(requester) ⇒ FDv1PollingDataSourceBuilder
private
Sets a custom Requester for the PollingDataSource.
Methods included from DataSourceBuilderCommon
#base_uri, #connect_timeout, #read_timeout, #socket_factory
Constructor Details
#initialize ⇒ FDv1PollingDataSourceBuilder
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 FDv1PollingDataSourceBuilder.
587 588 589 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 587 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.
620 621 622 623 624 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 620 def build(sdk_key, config) http_opts = build_http_config requester = @requester || HTTPFDv1PollingRequester.new(sdk_key, http_opts, config) PollingDataSource.new(@poll_interval || DEFAULT_POLL_INTERVAL, requester, config.logger) end |
#poll_interval(secs) ⇒ FDv1PollingDataSourceBuilder
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.
597 598 599 600 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 597 def poll_interval(secs) @poll_interval = secs self end |
#requester(requester) ⇒ FDv1PollingDataSourceBuilder
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.
608 609 610 611 |
# File 'lib/ldclient-rb/impl/data_system/polling.rb', line 608 def requester(requester) @requester = requester self end |