Class: PulsarSdk::Options::Connection
- Defined in:
- lib/pulsar_sdk/options/connection.rb
Constant Summary collapse
- DEFAULT_PORT =
6650
Instance Attribute Summary collapse
-
#auth_provider ⇒ Object
Returns the value of attribute auth_provider.
-
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
-
#keepalive ⇒ Object
Returns the value of attribute keepalive.
-
#logical_addr ⇒ Object
Returns the value of attribute logical_addr.
-
#operation_timeout ⇒ Object
Returns the value of attribute operation_timeout.
-
#physical_addr ⇒ Object
Returns the value of attribute physical_addr.
-
#tls_options ⇒ Object
Returns the value of attribute tls_options.
Instance Method Summary collapse
- #connecting_through_proxy? ⇒ Boolean
- #port_and_host_from(name) ⇒ Object
- #proxy_to_broker_url ⇒ Object
Methods included from Tweaks::AssignAttributes
#assign_attributes, #initialize
Methods included from Tweaks::CleanInspect
Instance Attribute Details
#auth_provider ⇒ Object
Returns the value of attribute auth_provider.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def auth_provider @auth_provider end |
#connection_timeout ⇒ Object
Returns the value of attribute connection_timeout.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def connection_timeout @connection_timeout end |
#keepalive ⇒ Object
Returns the value of attribute keepalive.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def keepalive @keepalive end |
#logical_addr ⇒ Object
Returns the value of attribute logical_addr.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def logical_addr @logical_addr end |
#operation_timeout ⇒ Object
Returns the value of attribute operation_timeout.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def operation_timeout @operation_timeout end |
#physical_addr ⇒ Object
Returns the value of attribute physical_addr.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def physical_addr @physical_addr end |
#tls_options ⇒ Object
Returns the value of attribute tls_options.
6 7 8 |
# File 'lib/pulsar_sdk/options/connection.rb', line 6 def @tls_options end |
Instance Method Details
#connecting_through_proxy? ⇒ Boolean
22 23 24 |
# File 'lib/pulsar_sdk/options/connection.rb', line 22 def connecting_through_proxy? logical_addr == physical_addr end |
#port_and_host_from(name) ⇒ Object
30 31 32 33 34 |
# File 'lib/pulsar_sdk/options/connection.rb', line 30 def port_and_host_from(name) v = instance_variable_get("@#{name}") return if v.nil? [v.port, v.host] end |
#proxy_to_broker_url ⇒ Object
26 27 28 |
# File 'lib/pulsar_sdk/options/connection.rb', line 26 def proxy_to_broker_url connecting_through_proxy? ? logical_addr : nil end |