MCPcopy Create free account
hub / github.com/bodaay/HuggingFaceModelDownloader / handleHealth

Method handleHealth

internal/server/api.go:98–104  ·  view source on GitHub ↗

--- Handlers --- handleHealth returns server health status.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

96
97// handleHealth returns server health status.
98func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) {
99 writeJSON(w, http.StatusOK, map[string]any{
100 "status": "ok",
101 "version": s.version(),
102 "time": time.Now().UTC().Format(time.RFC3339),
103 })
104}
105
106// handleStartDownload starts a new download job.
107func (s *Server) handleStartDownload(w http.ResponseWriter, r *http.Request) {

Callers 2

TestAPI_HealthFunction · 0.80

Calls 2

versionMethod · 0.95
writeJSONFunction · 0.85

Tested by 2

TestAPI_HealthFunction · 0.64