haproxy-lb/pkg/api/v1/server/handler.go
2020-11-22 12:59:12 +01:00

24 lines
347 B
Go

package server
import (
"net/http"
)
type notFoundHandler struct {
s *Server
}
func (nf *notFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
newContext(w, r, nf.s).NotFound()
}
func authHandler(h ctxHandler) ctxHandler {
return func(ctx *Context) {
// TODO
h(ctx)
}
}
func healthzHandler(ctx *Context) {
ctx.OK()
}