master
go 49 lines 1013 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 //go:build !cgo
4
5 package as400
6
7 import (
8 "context"
9 "errors"
10
11 "github.com/netdata/netdata/go/plugins/plugin/framework/collectorapi"
12 )
13
14 var configSchema string
15
16 type Collector struct {
17 collectorapi.Base
18 Config
19 }
20
21 func New() *Collector {
22 return &Collector{}
23 }
24
25 func (c *Collector) Configuration() any {
26 return &c.Config
27 }
28
29 func (c *Collector) Init(context.Context) error {
30 return errors.New("as400 collector requires CGO support")
31 }
32
33 func (c *Collector) Check(context.Context) error {
34 return errors.New("as400 collector requires CGO support")
35 }
36
37 func (c *Collector) Charts() *collectorapi.Charts { return nil }
38
39 func (c *Collector) Collect(context.Context) map[string]int64 { return nil }
40
41 func (c *Collector) Cleanup(context.Context) {}
42
43 func init() {
44 collectorapi.Register("as400", collectorapi.Creator{
45 JobConfigSchema: configSchema,
46 Create: func() collectorapi.CollectorV1 { return New() },
47 Config: func() any { return nil },
48 })
49 }