diff options
Diffstat (limited to 'src/go/collectors/go.d.plugin/modules/hdfs/init.go')
-rw-r--r-- | src/go/collectors/go.d.plugin/modules/hdfs/init.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/hdfs/init.go b/src/go/collectors/go.d.plugin/modules/hdfs/init.go new file mode 100644 index 000000000..79cd2e6bf --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/hdfs/init.go @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package hdfs + +import ( + "errors" + + "github.com/netdata/netdata/go/go.d.plugin/pkg/web" +) + +func (h *HDFS) validateConfig() error { + if h.URL == "" { + return errors.New("url not set") + } + return nil +} + +func (h *HDFS) createClient() (*client, error) { + httpClient, err := web.NewHTTPClient(h.Client) + if err != nil { + return nil, err + } + + return newClient(httpClient, h.Request), nil +} |