This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/apis/trips/tripsgo/healthCheckService.go

16 lines
328 B
Go
Raw Normal View History

2022-11-03 20:41:13 +00:00
package tripsgo
import (
"encoding/json"
"net/http"
)
func healthcheckGet(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.WriteHeader(http.StatusOK)
hc := &Healthcheck{Message: "Trip Service Healthcheck", Status: "Healthy"}
json.NewEncoder(w).Encode(hc)
}