4 ms·
I'm looking here https://github.com/basecamp/kamal-proxy/tree/main/internal/server https://github.com/basecamp/kamal-proxy/tree/main/internal/s... which is the
by francislavoie 2y ago
I'm looking here https://github.com/basecamp/kamal-proxy/tree/main/internal/server https://github.com/basecamp/kamal-proxy/tree/main/internal/s... which is the code for their v2 proxy. Notice there's a health_check.go which makes requests in a goroutine and sets the health to true/false based on the HTTP status, via a consumer interface.
As I said elsewhere in this topic, this is all too basic IMO, (disclaimer: I'm a Caddy maintainer) Caddy does this all in a more robust way.