You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to read out the current health status, without having to create a HTTP request.
Therefore the health status should be readable programmatically using the public Terminus API.
Looking through your code, I realized the core (terminus.js) would have to get restructured if done correctly.
When I tried to refactor the method decorateWithHealthCheck in terminus.js which contains the desired functionality, I realized everything is handled over parameters. My refactored function would look like the following:
The problem is, a user should not pass state nor options as a parameter. Thus it is still required for the functionality of getHealthStatus. A way to solve this problem, is to use a class instance for each createTerminus() call, which then can handle state or options as a property.
The text was updated successfully, but these errors were encountered:
Issue
I would like to read out the current health status, without having to create a HTTP request.
Therefore the health status should be readable programmatically using the public Terminus API.
Something like this:
Implementation
Looking through your code, I realized the core (terminus.js) would have to get restructured if done correctly.
When I tried to refactor the method
decorateWithHealthCheck
interminus.js
which contains the desired functionality, I realized everything is handled over parameters. My refactored function would look like the following:The problem is, a user should not pass
state
noroptions
as a parameter. Thus it is still required for the functionality ofgetHealthStatus
. A way to solve this problem, is to use a class instance for eachcreateTerminus()
call, which then can handlestate
oroptions
as a property.The text was updated successfully, but these errors were encountered: