faas/gateway/handlers/healthhandler.go
Alex Ellis (OpenFaaS Ltd) 49053feac7 Clarify EULA applies to this project since 2019
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2024-11-18 21:20:38 +00:00

23 lines
483 B
Go

// License: OpenFaaS Community Edition (CE) EULA
// Copyright (c) 2017,2019-2024 OpenFaaS Author(s)
// Copyright (c) OpenFaaS Author(s) 2019. All rights reserved.
package handlers
import "net/http"
// HealthzHandler healthz hanlder for mertics server
func HealthzHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet:
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
break
default:
w.WriteHeader(http.StatusMethodNotAllowed)
}
}