nelkinda / health-go

A golang implementation of the upcoming IETF RFC Health Check Response Format for HTTP APIs
MIT License
34 stars 7 forks source link

Can't set overall status #5

Open csmith opened 4 years ago

csmith commented 4 years ago

It doesn't look like there's a way to set the top-level pass/fail/warn status at the minute as it's forced to Pass in the HTTP handler:

https://github.com/nelkinda/health-go/blob/5a5bff6fc3ffce479f16153daaa96cdd3398f0df/health.go#L234

For my use-case it'd be ideal if that was generated automatically from the statuses of the component checks (i.e., Fail if any checks fail, else Warn if any checks warn, else Pass).