MCPcopy
hub / github.com/caddyserver/caddy / readConfig

Function readConfig

caddy.go:280–284  ·  view source on GitHub ↗

readConfig traverses the current config to path and writes its JSON encoding to out.

(path string, out io.Writer)

Source from the content-addressed store, hash-verified

278// readConfig traverses the current config to path
279// and writes its JSON encoding to out.
280func readConfig(path string, out io.Writer) error {
281 rawCfgMu.RLock()
282 defer rawCfgMu.RUnlock()
283 return unsyncedConfigAccess(http.MethodGet, path, nil, out)
284}
285
286// indexConfigObjects recursively searches ptr for object fields named
287// "@id" and maps that ID value to the full configPath in the index.

Callers 2

handleConfigFunction · 0.85
TestETagsFunction · 0.85

Calls 1

unsyncedConfigAccessFunction · 0.85

Tested by 1

TestETagsFunction · 0.68