lint: Move out config reloader context from controller struct

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
Petu Eusebiu
2022-03-24 14:49:51 +02:00
committed by Ramkumar Chinchani
parent 353b0c6034
commit be910cf01c
17 changed files with 91 additions and 84 deletions
+2
View File
@@ -42,6 +42,7 @@ type RouteHandler struct {
c *Controller
}
// nolint: contextcheck
func NewRouteHandler(c *Controller) *RouteHandler {
rh := &RouteHandler{c: c}
rh.SetupRoutes()
@@ -53,6 +54,7 @@ func allowedMethods(method string) []string {
return []string{http.MethodOptions, method}
}
// nolint: contextcheck
func (rh *RouteHandler) SetupRoutes() {
rh.c.Router.Use(AuthHandler(rh.c))
// authz is being enabled because authn is found