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
Lifecycle timeout (seconds) used for port checks and worker-thread cleanup (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
30 31 32 33 34 |
# File 'lib/nonnative/configuration_server.rb', line 30 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).
22 23 24 |
# File 'lib/nonnative/configuration_server.rb', line 22 def log @log end |
#timeout ⇒ Numeric
Returns lifecycle timeout (seconds) used for port checks and worker-thread cleanup
(defaults to 1.0).
19 20 21 |
# File 'lib/nonnative/configuration_server.rb', line 19 def timeout @timeout end |