MCPcopy Create free account
hub / github.com/netdata/netdata / writeJSON

Function writeJSON

src/go/plugin/framework/metricsaudit/capture.go:426–432  ·  view source on GitHub ↗
(path string, payload any)

Source from the content-addressed store, hash-verified

424}
425
426func writeJSON(path string, payload any) error {
427 data, err := json.MarshalIndent(payload, "", " ")
428 if err != nil {
429 return err
430 }
431 return os.WriteFile(path, data, 0o644)
432}

Callers 2

RecordCollectionMethod · 0.85
enqueueJSONWriteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…