feat: complete cmpp platform phases 0-5

This commit is contained in:
hectorzhao
2026-07-01 13:22:04 +08:00
parent 824a8b334f
commit ee926fea04
86 changed files with 10490 additions and 14 deletions
+26
View File
@@ -0,0 +1,26 @@
package health
import (
"encoding/json"
"net/http"
"time"
)
type Status struct {
Status string `json:"status"`
Service string `json:"service"`
Timestamp string `json:"timestamp"`
}
func Handler() http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(Status{
Status: "ok",
Service: "cmpp-gateway",
Timestamp: time.Now().UTC().Format(time.RFC3339Nano),
})
})
return mux
}