mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 08:25:03 +00:00
23 lines
483 B
Go
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)
|
|
}
|
|
}
|