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