Class: Nonnative::ConfigurationServer
- Inherits:
-
ConfigurationRunner
- Object
- ConfigurationRunner
- Nonnative::ConfigurationServer
- Defined in:
- lib/nonnative/configuration_server.rb
Overview
Server-specific configuration.
A “server” is an in-process Ruby component started in a background thread and stopped via a server-specific shutdown routine. It is managed by Server at runtime.
Instances are usually created through Nonnative::Configuration#server.
Constant Summary
Constants inherited from ConfigurationRunner
Nonnative::ConfigurationRunner::DEFAULT_TIMEOUT
Instance Attribute Summary collapse
-
#klass ⇒ Class
A class that implements ‘#initialize(service)` and the hooks expected by Server.
-
#log ⇒ String
Log file path used by server implementations (for example Puma/gRPC log files).
-
#timeout ⇒ Numeric
Readiness timeout (seconds) used when waiting for ports to open/close (defaults to ‘1.0`).
Attributes inherited from ConfigurationRunner
Instance Method Summary collapse
-
#initialize ⇒ void
constructor
Creates a server configuration with bounded lifecycle defaults.
Methods inherited from ConfigurationRunner
Constructor Details
#initialize ⇒ void
Creates a server configuration with bounded lifecycle defaults.
Defaults:
-
‘timeout`: `1.0`
29 30 31 32 33 |
# File 'lib/nonnative/configuration_server.rb', line 29 def initialize super self.timeout = DEFAULT_TIMEOUT end |
Instance Attribute Details
#klass ⇒ Class
Returns a class that implements ‘#initialize(service)` and the hooks expected by Server.
15 16 17 |
# File 'lib/nonnative/configuration_server.rb', line 15 def klass @klass end |
#log ⇒ String
Returns log file path used by server implementations (for example Puma/gRPC log files).
21 22 23 |
# File 'lib/nonnative/configuration_server.rb', line 21 def log @log end |
#timeout ⇒ Numeric
Returns readiness timeout (seconds) used when waiting for ports to open/close (defaults to ‘1.0`).
18 19 20 |
# File 'lib/nonnative/configuration_server.rb', line 18 def timeout @timeout end |