InVisionApp / go-health

Library for enabling asynchronous health checks in your service
MIT License
750 stars 58 forks source link

Persist checkers state? #66

Open gen2brain opened 5 years ago

gen2brain commented 5 years ago

Hi,

I would like to persist checkers state, so if some check was in the failed state after I restart service I would like to still be in a failed state and to expect recover. I can use map from State() to save that to some JSON file, but I don't see a way to set it for checker before Start(). Is this possible?

Thanks, Milan

gen2brain commented 5 years ago

I solved this by adding LoadState, like this https://github.com/gen2brain/go-health/commit/fd2225e1f326134d0f30418592ddae1a77de2347, and it works as expected.

Still, I would prefer to not use my fork.

schigh commented 5 years ago

@gen2brain apologies for the late response. I will look into this and prioritize it.

dselans commented 3 years ago

This totally makes sense. Should definitely have this functionality.