blob: 0819459fe64c000627d1a58dfab3be6a9c247403 (
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/netdata/go/plugins/plugin/go.d/agent/module"
"github.com/netdata/netdata/go/plugins/plugin/go.d/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
}
|