Class: HealthcheckEndpoint::Configuration
- Inherits:
-
Object
- Object
- HealthcheckEndpoint::Configuration
- Defined in:
- lib/healthcheck_endpoint/configuration.rb
Defined Under Namespace
Classes: Settings
Constant Summary collapse
- ATTRIBUTES =
%i[ services services_startup services_liveness services_readiness endpoints_namespace endpoint_startup endpoint_liveness endpoint_readiness endpoint_startup_status_success endpoint_liveness_status_success endpoint_readiness_status_success endpoint_startup_status_failure endpoint_liveness_status_failure endpoint_readiness_status_failure ].freeze
- ENDPOINTS_NAMESPACE =
'/healthcheck'
- ENDPOINT_STARTUP =
'/startup'
- ENDPOINT_LIVENESS =
'/liveness'
- ENDPOINT_READINESS =
'/readiness'
- DEFAULT_HTTP_STATUS_SUCCESS =
200
- DEFAULT_HTTP_STATUS_FAILURE =
500
- AVILABLE_HTTP_STATUSES_SUCCESS =
(DEFAULT_HTTP_STATUS_SUCCESS..226).freeze
- AVILABLE_HTTP_STATUSES_FAILURE =
(DEFAULT_HTTP_STATUS_FAILURE..511).freeze
Instance Method Summary collapse
-
#initialize(&block) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(&block) ⇒ Configuration
Returns a new instance of Configuration.
40 41 42 43 44 45 |
# File 'lib/healthcheck_endpoint/configuration.rb', line 40 def initialize(&block) configuration_settings = build_configuration_settings(&block) HealthcheckEndpoint::Configuration::ATTRIBUTES.each do |attribute| public_send(:"#{attribute}=", configuration_settings.public_send(attribute)) end end |