faas/gateway/handlers/healthhandler.go
Alex Ellis (OpenFaaS Ltd) f3599f4699 Apply gofmt
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
2022-12-14 11:40:43 +00:00

21 lines
484 B
Go

// Copyright (c) OpenFaaS Author(s) 2019. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
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)
}
}