mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-17 02:11:30 +00:00
6d135b0d1b
* Separation of node health and initialization state from rln_relay status. Make (only) health endpoint avail early and install others in the last stage of node setup. * Proper json report from /health, adjusted and fixed test, added convenient script for checking node health * Stop wakunode2 if configured rest server cannot be started * Fix wakuRlnRelay protocol existence check * Fix typo * Removed unused imports from touched files. * Added missing /health test for all
16 lines
438 B
Nim
16 lines
438 B
Nim
when (NimMajor, NimMinor) < (1, 4):
|
|
{.push raises: [Defect].}
|
|
else:
|
|
{.push raises: [].}
|
|
|
|
import
|
|
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]
|
|
import ./types, ../serdes, ../responses, ../rest_serdes, ../../waku/node/health_monitor
|
|
|
|
logScope:
|
|
topics = "waku node rest health_api"
|
|
|
|
proc healthCheck*(): RestResponse[HealthReport] {.
|
|
rest, endpoint: "/health", meth: HttpMethod.MethodGet
|
|
.}
|