MCPcopy
hub / github.com/netdata/netdata / New

Function New

src/go/pkg/netdataapi/api.go:29–34  ·  view source on GitHub ↗

New creates a new API instance for interacting with Netdata. Panics if the provided writer is nil.

(w io.Writer)

Source from the content-addressed store, hash-verified

27// New creates a new API instance for interacting with Netdata.
28// Panics if the provided writer is nil.
29func New(w io.Writer) *API {
30 if w == nil {
31 panic("writer cannot be nil")
32 }
33 return &API{w}
34}
35
36// CHART creates or updates a chart.
37func (a *API) CHART(opts ChartOpts) {

Callers 15

TestNewFunction · 0.70
TestChartFunction · 0.70
TestDimensionFunction · 0.70
TestCLABELFunction · 0.70
TestCLABELCOMMITFunction · 0.70
TestBEGINFunction · 0.70
TestSETFunction · 0.70
TestSETFLOATFunction · 0.70
TestSETEMPTYFunction · 0.70
TestVARIABLEFunction · 0.70
TestENDFunction · 0.70
TestDISABLEFunction · 0.70

Calls

no outgoing calls

Tested by 15

TestNewFunction · 0.56
TestChartFunction · 0.56
TestDimensionFunction · 0.56
TestCLABELFunction · 0.56
TestCLABELCOMMITFunction · 0.56
TestBEGINFunction · 0.56
TestSETFunction · 0.56
TestSETFLOATFunction · 0.56
TestSETEMPTYFunction · 0.56
TestVARIABLEFunction · 0.56
TestENDFunction · 0.56
TestDISABLEFunction · 0.56