master
go 24 lines 421 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package dummy
4
5 import (
6 "errors"
7
8 "github.com/netdata/netdata/go/plugins/plugin/framework/confgroup"
9 )
10
11 type Config struct {
12 Registry confgroup.Registry
13 Names []string
14 }
15
16 func validateConfig(cfg Config) error {
17 if len(cfg.Registry) == 0 {
18 return errors.New("empty config registry")
19 }
20 if len(cfg.Names) == 0 {
21 return errors.New("names not set")
22 }
23 return nil
24 }