Skip to content

Commit 9ee79f9

Browse files
author
s0s01qp
committed
fixed config handling
1 parent f47c1ef commit 9ee79f9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎actuator.go‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,25 @@ import (
1313

1414
// GetFastHTTPActuatorHandler is used to get the request handler for fast http
1515
func GetFastHTTPActuatorHandler(config *models.Config) fasthttp.RequestHandler {
16+
handleConfigs(config)
1617
return func(ctx *fasthttp.RequestCtx) {
1718
fastHTTPControllers.HandleRequest(config, ctx)
1819
}
1920
}
2021

2122
// ConfigureGINActuatorEngine is used to configure the gin engine with the actuator handlers
2223
func ConfigureGINActuatorEngine(config *models.Config, engine *gin.Engine) {
24+
handleConfigs(config)
2325
ginControllers.ConfigureHandlers(config, engine)
2426
}
2527

2628
// ConfigureNetHTTPHandler is used to configure the net http mux with the actuator handlers
2729
func ConfigureNetHTTPHandler(config *models.Config, mux *http.ServeMux) {
30+
handleConfigs(config)
2831
netHTTPControllers.ConfigureHandlers(config, mux)
2932
}
33+
34+
func handleConfigs(config *models.Config) {
35+
config.Validate()
36+
config.Default()
37+
}

0 commit comments

Comments
 (0)