wal-listener
wal-listener copied to clipboard
Add health check
A proposal to solve https://github.com/ihippik/wal-listener/issues/31
The code does get a little more complicated, but running start up activities asynchronously is more or less a requirement for Kubernetes, as the app is expected to respond to alive-probes (but not necessarily ready-probes) at once. The general structure is one I have used in other projects, and it works well.
PR also adds optional config - the health check server is only started if the config is there.
There is perhaps some inconsistency in how log messages are formated now, but perhaps that does not matter?