Class: Nonnative::Service
Overview
Runtime runner for an external dependency.
A service runner does not manage an OS process or Ruby thread. It exists so Nonnative can manage a proxy lifecycle (start/stop/reset) for an external service that is managed elsewhere (for example a database running in Docker).
The underlying configuration is a ConfigurationService.
Instance Attribute Summary
Attributes inherited from Runner
Instance Method Summary collapse
-
#start ⇒ void
Starts the configured proxy (if any).
-
#stop ⇒ void
Stops the configured proxy (if any).
Methods inherited from Runner
Constructor Details
This class inherits a constructor from Nonnative::Runner
Instance Method Details
#start ⇒ void
This method returns an undefined value.
Starts the configured proxy (if any).
18 19 20 21 22 |
# File 'lib/nonnative/service.rb', line 18 def start proxy.start Nonnative.logger.info "started service '#{service.name}'" end |
#stop ⇒ void
This method returns an undefined value.
Stops the configured proxy (if any).
27 28 29 30 31 |
# File 'lib/nonnative/service.rb', line 27 def stop proxy.stop Nonnative.logger.info "stopped service '#{service.name}'" end |