feat: add auto route healthcheck

This commit is contained in:
Jonas Kaninda
2024-11-12 12:38:34 +01:00
parent 836adf458d
commit e541d0066d
12 changed files with 168 additions and 15 deletions

View File

@@ -26,6 +26,7 @@ import (
"time"
)
// Start starts the server
func (gatewayServer GatewayServer) Start(ctx context.Context) error {
logger.Info("Initializing routes...")
route := gatewayServer.Initialize()
@@ -64,7 +65,6 @@ func (gatewayServer GatewayServer) Start(ctx context.Context) error {
}
// Set KeepAlive
httpServer.SetKeepAlivesEnabled(!gatewayServer.gateway.DisableKeepAlive)
httpsServer.SetKeepAlivesEnabled(!gatewayServer.gateway.DisableKeepAlive)
go func() {
logger.Info("Starting HTTP server listen=0.0.0.0:8080")
if err := httpServer.ListenAndServe(); err != nil {