go-health icon indicating copy to clipboard operation
go-health copied to clipboard

Persist checkers state?

Open gen2brain opened this issue 4 years ago • 3 comments

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 avatar Aug 20 '19 20:08 gen2brain

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.

gen2brain avatar Aug 26 '19 11:08 gen2brain

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

schigh avatar Sep 26 '19 13:09 schigh

This totally makes sense. Should definitely have this functionality.

dselans avatar Jan 31 '21 19:01 dselans