blob: a577db7732ead845f9aaacd45b36d64742889736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// SPDX-License-Identifier: GPL-3.0-or-later
package powerdns
import (
"errors"
"net/http"
"github.com/netdata/go.d.plugin/agent/module"
"github.com/netdata/go.d.plugin/pkg/web"
)
func (ns AuthoritativeNS) validateConfig() error {
if ns.URL == "" {
return errors.New("URL not set")
}
if _, err := web.NewHTTPRequest(ns.Request); err != nil {
return err
}
return nil
}
func (ns AuthoritativeNS) initHTTPClient() (*http.Client, error) {
return web.NewHTTPClient(ns.Client)
}
func (ns AuthoritativeNS) initCharts() (*module.Charts, error) {
return charts.Copy(), nil
}
|