Configurable and very basic health check endpoint #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The primary purpose of this change is to address #131 .
It creates a simple endpoint, which only responds to
GET
requests. It responds with200 OK
if the server up and running. By default, the endpoint is at/health
under theBasePath
, but you can set an alternative path for it using theHealthEndpoint
config key or the command-line flag-e
.There was discussion of multiple endpoints in the issue, but I don't think I have the necessary context to decide when
startup
versusreadiness
ones should return a 200. Also, it sounds like people may want to supply multiple alternate paths; I have left that for another day.While I was in there, I
postgis
extension (in my case, it was because my test user didn't have permission). I don't know how common this scenario is, but it happened to me because I was starting the project up from scratch to take a look at making this change in particular.