Add /health endpoint
This PR adds a new /health endpoint which for now, just displays the version and is designed to be used to determine API health and inform of the running version for diagnostic/informational purposes:
$ curl -qs http://127.0.0.1:4000/health | jq .
{
"version": "v0.18-114-gb9384d5"
}
Am not sure if I did this correctly or missed adding any tests etc so would love to hear any feedback 🙂
cc @0xERR0R
Codecov Report
Merging #606 (b9384d5) into development (50ac5ce) will decrease coverage by
1.19%. The diff coverage is80.00%.
@@ Coverage Diff @@
## development #606 +/- ##
===============================================
- Coverage 93.90% 92.70% -1.20%
===============================================
Files 37 37
Lines 3263 3278 +15
===============================================
- Hits 3064 3039 -25
- Misses 134 173 +39
- Partials 65 66 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| resolver/blocking_resolver.go | 97.61% <0.00%> (-0.88%) |
:arrow_down: |
| api/api_endpoints.go | 91.66% <100.00%> (+2.08%) |
:arrow_up: |
| redis/redis.go | 66.44% <0.00%> (-24.35%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 50ac5ce...b9384d5. Read the comment docs.
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This PR was closed because it has been stalled for 10 days with no activity.