MCPcopy
hub / github.com/netdata/netdata / EnableDataCapture

Method EnableDataCapture

src/go/plugin/framework/metricsaudit/capture.go:29–41  ·  view source on GitHub ↗
(dir string, onComplete func())

Source from the content-addressed store, hash-verified

27}
28
29func (da *Auditor) EnableDataCapture(dir string, onComplete func()) {
30 da.mu.Lock()
31 defer da.mu.Unlock()
32
33 da.dataDir = dir
34 da.onComplete = onComplete
35 if dir == "" || da.writeCh != nil {
36 return
37 }
38
39 da.writeCh = make(chan writeTask, writeQueueSize)
40 go da.runWriter(da.writeCh)
41}
42
43func (da *Auditor) runWriter(ch <-chan writeTask) {
44 for task := range ch {

Callers 2

NewFunction · 0.80

Calls 3

runWriterMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80