Module: LaunchDarkly::Impl::DataSystem::DataSourceBuilderCommon Private

Included in:
FDv1PollingDataSourceBuilder, PollingDataSourceBuilder, StreamingDataSourceBuilder
Defined in:
lib/ldclient-rb/impl/data_system/data_source_builder_common.rb

Overview

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

DataSourceBuilderCommon is a mixin that provides common HTTP configuration setters for data source builders (polling and streaming).

Each builder that includes this module must define a DEFAULT_BASE_URI constant.

Since:

  • 5.5.0

Instance Method Summary collapse

Instance Method Details

#base_uri(uri) ⇒ self

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 base URI for HTTP requests.

Parameters:

  • uri (String)

Returns:

  • (self)

Since:

  • 5.5.0



21
22
23
24
# File 'lib/ldclient-rb/impl/data_system/data_source_builder_common.rb', line 21

def base_uri(uri)
  @base_uri = uri
  self
end

#connect_timeout(timeout) ⇒ self

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 connect timeout for HTTP connections.

Parameters:

  • timeout (Float)

    Timeout in seconds

Returns:

  • (self)

Since:

  • 5.5.0



54
55
56
57
# File 'lib/ldclient-rb/impl/data_system/data_source_builder_common.rb', line 54

def connect_timeout(timeout)
  @connect_timeout = timeout
  self
end

#read_timeout(timeout) ⇒ self

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 read timeout for HTTP connections.

Parameters:

  • timeout (Float)

    Timeout in seconds

Returns:

  • (self)

Since:

  • 5.5.0



43
44
45
46
# File 'lib/ldclient-rb/impl/data_system/data_source_builder_common.rb', line 43

def read_timeout(timeout)
  @read_timeout = timeout
  self
end

#socket_factory(factory) ⇒ self

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 socket factory for HTTP connections.

Parameters:

  • factory (Object)

Returns:

  • (self)

Since:

  • 5.5.0



32
33
34
35
# File 'lib/ldclient-rb/impl/data_system/data_source_builder_common.rb', line 32

def socket_factory(factory)
  @socket_factory = factory
  self
end