MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / handleGetConfig

Method handleGetConfig

internal/ipsentinel/nodehandler.go:212–219  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

210}
211
212func (h *NodeHandler) handleGetConfig(w http.ResponseWriter, r *http.Request) {
213 cfg, err := h.loadConfig()
214 if err != nil {
215 writeNodeJSON(w, http.StatusInternalServerError, map[string]any{"error": err.Error()})
216 return
217 }
218 writeNodeJSON(w, http.StatusOK, cfg)
219}
220
221func (h *NodeHandler) handleSetConfig(w http.ResponseWriter, r *http.Request) {
222 var cfg Config

Callers

nothing calls this directly

Calls 3

loadConfigMethod · 0.95
writeNodeJSONFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected