blocky icon indicating copy to clipboard operation
blocky copied to clipboard

Add /health endpoint

Open ashmckenzie opened this issue 3 years ago • 2 comments

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"
}

ashmckenzie avatar Jul 21 '22 11:07 ashmckenzie

Am not sure if I did this correctly or missed adding any tests etc so would love to hear any feedback 🙂

cc @0xERR0R

ashmckenzie avatar Jul 21 '22 11:07 ashmckenzie

Codecov Report

Merging #606 (b9384d5) into development (50ac5ce) will decrease coverage by 1.19%. The diff coverage is 80.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 data Powered by Codecov. Last update 50ac5ce...b9384d5. Read the comment docs.

codecov[bot] avatar Jul 23 '22 19:07 codecov[bot]

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.

github-actions[bot] avatar Sep 07 '22 05:09 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Sep 18 '22 05:09 github-actions[bot]