Class: Nonnative::ConfigurationReadiness
- Inherits:
-
Object
- Object
- Nonnative::ConfigurationReadiness
- Defined in:
- lib/nonnative/configuration_readiness.rb
Overview
HTTP readiness configuration for a managed process.
Readiness is optional. When present, both port and path are required so the startup
check has an explicit application endpoint to poll after TCP readiness succeeds.
Instance Attribute Summary collapse
-
#path ⇒ String
Path-only HTTP readiness path.
-
#port ⇒ Integer
Process HTTP readiness port.
Instance Method Summary collapse
-
#initialize(value) ⇒ ConfigurationReadiness
constructor
A new instance of ConfigurationReadiness.
Constructor Details
#initialize(value) ⇒ ConfigurationReadiness
Returns a new instance of ConfigurationReadiness.
16 17 18 19 20 21 22 |
# File 'lib/nonnative/configuration_readiness.rb', line 16 def initialize(value) attributes = value.respond_to?(:to_h) ? value.to_h : value self.port = attribute(attributes, :port) self.path = attribute(attributes, :path) validate! end |
Instance Attribute Details
#path ⇒ String
Returns path-only HTTP readiness path.
13 14 15 |
# File 'lib/nonnative/configuration_readiness.rb', line 13 def path @path end |
#port ⇒ Integer
Returns process HTTP readiness port.
10 11 12 |
# File 'lib/nonnative/configuration_readiness.rb', line 10 def port @port end |