Class: Nonnative::ConfigurationRunner
- Inherits:
-
Object
- Object
- Nonnative::ConfigurationRunner
- Defined in:
- lib/nonnative/configuration_runner.rb
Overview
Base configuration for a runnable unit managed by Nonnative.
This class holds connection and timing attributes common to processes, servers and services, as well as a nested ConfigurationProxy describing how/if a proxy should be started.
Instances of this type are typically created via Nonnative::Configuration#process, Nonnative::Configuration#server, or Nonnative::Configuration#service.
Direct Known Subclasses
ConfigurationProcess, ConfigurationServer, ConfigurationService
Instance Attribute Summary collapse
- #host ⇒ String, ...
- #name ⇒ String, ...
- #port ⇒ String, ...
-
#proxy ⇒ Nonnative::ConfigurationProxy
Proxy configuration for this runner.
- #wait ⇒ String, ...
Instance Method Summary collapse
-
#initialize ⇒ void
constructor
Creates a runner configuration with defaults.
Constructor Details
#initialize ⇒ void
Creates a runner configuration with defaults.
Defaults:
-
host: ‘“0.0.0.0”` -
port:0 -
wait:0.1 -
proxy: a new Nonnative::ConfigurationProxy with its own defaults
39 40 41 42 43 44 45 |
# File 'lib/nonnative/configuration_runner.rb', line 39 def initialize self.host = '0.0.0.0' self.port = 0 self.wait = 0.1 @proxy = Nonnative::ConfigurationProxy.new end |
Instance Attribute Details
#host ⇒ String, ...
20 21 22 |
# File 'lib/nonnative/configuration_runner.rb', line 20 def host @host end |
#name ⇒ String, ...
20 21 22 |
# File 'lib/nonnative/configuration_runner.rb', line 20 def name @name end |
#port ⇒ String, ...
20 21 22 |
# File 'lib/nonnative/configuration_runner.rb', line 20 def port @port end |
#proxy ⇒ Nonnative::ConfigurationProxy
Proxy configuration for this runner.
Note that this returns a configuration object even if no proxy is enabled; by default the proxy kind is ‘“none”`.
28 29 30 |
# File 'lib/nonnative/configuration_runner.rb', line 28 def proxy @proxy end |
#wait ⇒ String, ...
20 21 22 |
# File 'lib/nonnative/configuration_runner.rb', line 20 def wait @wait end |