Open jeevatkm opened 5 years ago
@adrianlop welcome 😄
I just pushed a basic PR here: https://github.com/go-aah/ec-healthcheck-provider/pull/1/files
let's discuss and review in there if you like! cheers @jeevatkm
@adrianlop I have added Go vanity for aahframe.work/ec/health
so available to use for try/test https://godoc.org/aahframe.work/ec/health
Until official release, please do go get aahframe.work/ec/health@master
in your application to test/use it will update your go.mod
with latest version of library every time you run it.
The goal is to create a pluggable component for health check feature in aah.
Goals:
Design:
aahframe.work/ec/healthcheck
- yet to be doneinterface
for implementing health check reporterfunc Check() error
hc.AddReporter(healthcheck.Config{/* report name, implementation based on above interface, duration, skip on error, etc... */})
200 OK
if every registered health checker/reporter returnsnil
503 Service Unavailable
if any registered checker/reporter returnnon-nil
except skip on errorSample response payload (a conceptual idea, yet to be finalized)