Skip to content

Commit 8bdf07f

Browse files
authored
Implement healthz endpoint for health checks
Add health check endpoint that responds with 200
1 parent a9d15be commit 8bdf07f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ func main() {
383383
// Create a new proxy server with the path to the YAML config
384384
proxy := NewProxyServer(conf.ConfigPath, conf.QueueSize, conf.WorkerCount, conf.TerminateFile) // queue size = 100, worker count = 5
385385

386+
// Hadle healthz endpoint with automatic 200
387+
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {})
386388
// HTTP handler for incoming requests
387389
http.HandleFunc("/", proxy.handleIncomingRequest)
388390

0 commit comments

Comments
 (0)