go-dcp
go-dcp copied to clipboard
feat: make healthcheck more resilient (retry + reconnect)
In current implementation, I noticed healthcheck function ^1 does not support for retrying along with graceful handling. ^2
Proposal
It would be nice to add a something failureThreshold to ConfigHealthCheck. So that after ping fails failureThreshold times in a row, go-dcp-client should treats the CB connection as unhealthy and triggers a restart/reconnect for that specific server.
Happy to discuss reasonable.
thank you so much @Dentrax i think its very good idea. also we need to cover /status endpoint to same way.
https://github.com/Trendyol/go-dcp-client/blob/master/api.go#L48