Class: LaunchDarkly::Impl::DataSystem::HttpConfigOptions Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/impl/data_system/http_config_options.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.

HttpConfigOptions contains HTTP connection configuration settings. This class is created by data source builders and passed to v2 Requesters/DataSources.

Since:

  • 5.5.0

Constant Summary collapse

DEFAULT_READ_TIMEOUT =

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.

Generic HTTP defaults - base URIs live in the respective builders

Since:

  • 5.5.0

10
DEFAULT_CONNECT_TIMEOUT =

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

2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_uri:, socket_factory: nil, read_timeout: nil, connect_timeout: nil) ⇒ HttpConfigOptions

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 HttpConfigOptions.

Parameters:

  • base_uri (String)

    The base URI for HTTP requests

  • socket_factory (Object, nil) (defaults to: nil)

    Optional socket factory for custom connections

  • read_timeout (Float, nil) (defaults to: nil)

    Read timeout in seconds (defaults to DEFAULT_READ_TIMEOUT)

  • connect_timeout (Float, nil) (defaults to: nil)

    Connect timeout in seconds (defaults to DEFAULT_CONNECT_TIMEOUT)

Since:

  • 5.5.0



23
24
25
26
27
28
# File 'lib/ldclient-rb/impl/data_system/http_config_options.rb', line 23

def initialize(base_uri:, socket_factory: nil, read_timeout: nil, connect_timeout: nil)
  @base_uri = base_uri
  @socket_factory = socket_factory
  @read_timeout = read_timeout || DEFAULT_READ_TIMEOUT
  @connect_timeout = connect_timeout || DEFAULT_CONNECT_TIMEOUT
end

Instance Attribute Details

#base_uriObject (readonly)

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.

Since:

  • 5.5.0



15
16
17
# File 'lib/ldclient-rb/impl/data_system/http_config_options.rb', line 15

def base_uri
  @base_uri
end

#connect_timeoutObject (readonly)

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.

Since:

  • 5.5.0



15
16
17
# File 'lib/ldclient-rb/impl/data_system/http_config_options.rb', line 15

def connect_timeout
  @connect_timeout
end

#read_timeoutObject (readonly)

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.

Since:

  • 5.5.0



15
16
17
# File 'lib/ldclient-rb/impl/data_system/http_config_options.rb', line 15

def read_timeout
  @read_timeout
end

#socket_factoryObject (readonly)

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.

Since:

  • 5.5.0



15
16
17
# File 'lib/ldclient-rb/impl/data_system/http_config_options.rb', line 15

def socket_factory
  @socket_factory
end