Class: Nonnative::ConfigurationService
- Inherits:
-
ConfigurationRunner
- Object
- ConfigurationRunner
- Nonnative::ConfigurationService
- Defined in:
- lib/nonnative/configuration_service.rb
Overview
Service-specific configuration.
A “service” is proxy-only: it does not start a Ruby thread or OS process. It exists so Nonnative can start and control a proxy in front of an external dependency.
Instances are usually created through Nonnative::Configuration#service.
Instance Attribute Summary collapse
-
#port ⇒ Integer
Client-facing port used by the service proxy.
Attributes inherited from ConfigurationRunner
Instance Method Summary collapse
-
#initialize ⇒ void
constructor
Creates a service configuration with defaults.
-
#ports ⇒ void
Services expose a single proxy listener, so plural runner ports are not supported.
-
#ports=(_value) ⇒ void
Services expose a single proxy listener, so plural runner ports are not supported.
Constructor Details
#initialize ⇒ void
Creates a service configuration with defaults.
20 21 22 23 24 |
# File 'lib/nonnative/configuration_service.rb', line 20 def initialize super self.port = 0 end |
Instance Attribute Details
#port ⇒ Integer
Returns client-facing port used by the service proxy.
15 16 17 |
# File 'lib/nonnative/configuration_service.rb', line 15 def port @port end |
Instance Method Details
#ports ⇒ void
This method returns an undefined value.
Services expose a single proxy listener, so plural runner ports are not supported.
30 31 32 |
# File 'lib/nonnative/configuration_service.rb', line 30 def ports raise ArgumentError, "Use 'port' instead of 'ports' for service '#{name}'" end |
#ports=(_value) ⇒ void
This method returns an undefined value.
Services expose a single proxy listener, so plural runner ports are not supported.
39 40 41 |
# File 'lib/nonnative/configuration_service.rb', line 39 def ports=(_value) raise ArgumentError, "Use 'port' instead of 'ports' for service '#{name}'" end |