mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
427 B
21 lines
427 B
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func readinessProbe(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusOK)
|
|
}
|
|
|
|
func livenessProbe(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusOK)
|
|
}
|
|
|
|
func runProbesServer(addr string) error {
|
|
mux := http.NewServeMux()
|
|
mux.HandleFunc("/readiness", readinessProbe)
|
|
mux.HandleFunc("/liveness", livenessProbe)
|
|
return http.ListenAndServe(addr, mux)
|
|
}
|