New creates a new API instance for interacting with Netdata. Panics if the provided writer is nil.
(w io.Writer)
| 27 | // New creates a new API instance for interacting with Netdata. |
| 28 | // Panics if the provided writer is nil. |
| 29 | func 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. |
| 37 | func (a *API) CHART(opts ChartOpts) { |
no outgoing calls