Class: Nonnative::ConfigurationProcess
- Inherits:
-
ConfigurationRunner
- Object
- ConfigurationRunner
- Nonnative::ConfigurationProcess
- Defined in:
- lib/nonnative/configuration_process.rb
Overview
Process-specific configuration.
A “process” is an OS-level child process started via ‘spawn` and stopped via signals. It is managed by Process at runtime.
Instances are usually created through Nonnative::Configuration#process.
Instance Attribute Summary collapse
-
#command ⇒ Proc
A callable that returns the command to execute as a shell string or argv array (e.g. ‘-> { “./bin/api” }` or `-> { [“./bin/api”, “–port”, “8080”] }`).
-
#environment ⇒ Hash?
Environment variables to pass to the spawned process.
-
#log ⇒ String
Log file path to append process stdout/stderr to.
-
#signal ⇒ String?
Signal name to use for stopping (defaults to ‘“INT”` when not set).
-
#timeout ⇒ Numeric
Readiness timeout (seconds) used when waiting for the port to open/close.
Attributes inherited from ConfigurationRunner
#host, #name, #port, #proxy, #wait
Method Summary
Methods inherited from ConfigurationRunner
Constructor Details
This class inherits a constructor from Nonnative::ConfigurationRunner
Instance Attribute Details
#command ⇒ Proc
Returns a callable that returns the command to execute as a shell string or argv array (e.g. ‘-> { “./bin/api” }` or `-> { [“./bin/api”, “–port”, “8080”] }`).
17 18 19 |
# File 'lib/nonnative/configuration_process.rb', line 17 def command @command end |
#environment ⇒ Hash?
Returns environment variables to pass to the spawned process.
29 30 31 |
# File 'lib/nonnative/configuration_process.rb', line 29 def environment @environment end |
#log ⇒ String
Returns log file path to append process stdout/stderr to.
26 27 28 |
# File 'lib/nonnative/configuration_process.rb', line 26 def log @log end |
#signal ⇒ String?
Returns signal name to use for stopping (defaults to ‘“INT”` when not set).
20 21 22 |
# File 'lib/nonnative/configuration_process.rb', line 20 def signal @signal end |
#timeout ⇒ Numeric
Returns readiness timeout (seconds) used when waiting for the port to open/close.
23 24 25 |
# File 'lib/nonnative/configuration_process.rb', line 23 def timeout @timeout end |