From f2e442ba8af973caf8987297de64a37118501e0a Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Wed, 18 Sep 2024 19:55:48 +0300 Subject: [PATCH] go.d move packages (#18580) --- src/go/cmd/godplugin/main.go | 2 +- src/go/{plugin/go.d => }/pkg/matcher/README.md | 0 src/go/{plugin/go.d => }/pkg/matcher/cache.go | 0 src/go/{plugin/go.d => }/pkg/matcher/cache_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/doc.go | 0 src/go/{plugin/go.d => }/pkg/matcher/doc_test.go | 4 +++- src/go/{plugin/go.d => }/pkg/matcher/expr.go | 0 src/go/{plugin/go.d => }/pkg/matcher/expr_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/glob.go | 2 +- src/go/{plugin/go.d => }/pkg/matcher/glob_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/logical.go | 0 src/go/{plugin/go.d => }/pkg/matcher/logical_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/matcher.go | 0 src/go/{plugin/go.d => }/pkg/matcher/matcher_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/regexp.go | 0 src/go/{plugin/go.d => }/pkg/matcher/regexp_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/simple_patterns.go | 0 .../{plugin/go.d => }/pkg/matcher/simple_patterns_test.go | 0 src/go/{plugin/go.d => }/pkg/matcher/string.go | 0 src/go/{plugin/go.d => }/pkg/matcher/string_test.go | 0 src/go/{plugin/go.d => }/pkg/multipath/multipath.go | 0 src/go/{plugin/go.d => }/pkg/multipath/multipath_test.go | 0 .../go.d => }/pkg/multipath/testdata/data1/test-empty.conf | 0 .../go.d => }/pkg/multipath/testdata/data1/test.conf | 0 .../go.d => }/pkg/multipath/testdata/data2/test-empty.conf | 0 .../go.d => }/pkg/multipath/testdata/data2/test.conf | 0 src/go/{plugin/go.d/agent => pkg}/netdataapi/api.go | 0 src/go/{plugin/go.d/agent => pkg}/netdataapi/api_test.go | 0 src/go/{plugin/go.d/agent => pkg}/safewriter/writer.go | 0 src/go/{plugin/go.d/agent => pkg}/ticker/ticker.go | 0 src/go/{plugin/go.d/agent => pkg}/ticker/ticket_test.go | 0 src/go/plugin/go.d/agent/agent.go | 6 +++--- src/go/plugin/go.d/agent/agent_test.go | 2 +- src/go/plugin/go.d/agent/discovery/sd/conffile.go | 2 +- src/go/plugin/go.d/agent/discovery/sd/pipeline/funcmap.go | 2 +- src/go/plugin/go.d/agent/discovery/sd/sd.go | 2 +- src/go/plugin/go.d/agent/functions/manager.go | 4 ++-- src/go/plugin/go.d/agent/jobmgr/manager.go | 6 +++--- src/go/plugin/go.d/agent/jobmgr/sim_test.go | 4 ++-- src/go/plugin/go.d/agent/module/job.go | 2 +- src/go/plugin/go.d/examples/simple/main.go | 6 +++--- src/go/plugin/go.d/modules/activemq/activemq.go | 2 +- src/go/plugin/go.d/modules/activemq/init.go | 2 +- src/go/plugin/go.d/modules/beanstalk/beanstalk.go | 2 +- src/go/plugin/go.d/modules/beanstalk/init.go | 2 +- src/go/plugin/go.d/modules/bind/bind.go | 2 +- src/go/plugin/go.d/modules/bind/init.go | 2 +- src/go/plugin/go.d/modules/coredns/coredns.go | 2 +- src/go/plugin/go.d/modules/coredns/init.go | 2 +- src/go/plugin/go.d/modules/filecheck/filecheck.go | 2 +- src/go/plugin/go.d/modules/filecheck/init.go | 2 +- src/go/plugin/go.d/modules/fluentd/fluentd.go | 2 +- src/go/plugin/go.d/modules/fluentd/init.go | 2 +- src/go/plugin/go.d/modules/httpcheck/init.go | 2 +- src/go/plugin/go.d/modules/mongodb/mongodb.go | 2 +- src/go/plugin/go.d/modules/mongodb/mongodb_test.go | 2 +- src/go/plugin/go.d/modules/openvpn/init.go | 2 +- src/go/plugin/go.d/modules/openvpn/openvpn.go | 2 +- src/go/plugin/go.d/modules/openvpn/openvpn_test.go | 2 +- src/go/plugin/go.d/modules/openvpn_status_log/init.go | 2 +- src/go/plugin/go.d/modules/openvpn_status_log/openvpn.go | 2 +- .../plugin/go.d/modules/openvpn_status_log/openvpn_test.go | 2 +- src/go/plugin/go.d/modules/postgres/init.go | 2 +- src/go/plugin/go.d/modules/postgres/postgres.go | 2 +- src/go/plugin/go.d/modules/postgres/postgres_test.go | 2 +- src/go/plugin/go.d/modules/prometheus/init.go | 2 +- src/go/plugin/go.d/modules/prometheus/prometheus.go | 2 +- src/go/plugin/go.d/modules/pulsar/init.go | 2 +- src/go/plugin/go.d/modules/pulsar/pulsar.go | 2 +- src/go/plugin/go.d/modules/pulsar/pulsar_test.go | 2 +- src/go/plugin/go.d/modules/smartctl/init.go | 2 +- src/go/plugin/go.d/modules/smartctl/smartctl.go | 2 +- src/go/plugin/go.d/modules/snmp/init.go | 4 ++-- src/go/plugin/go.d/modules/snmp/snmp.go | 2 +- src/go/plugin/go.d/modules/systemdunits/init.go | 2 +- src/go/plugin/go.d/modules/systemdunits/systemdunits.go | 2 +- src/go/plugin/go.d/modules/vsphere/match/match.go | 2 +- src/go/plugin/go.d/modules/vsphere/match/match_test.go | 2 +- src/go/plugin/go.d/modules/weblog/init.go | 2 +- src/go/plugin/go.d/pkg/README.md | 2 +- src/go/plugin/go.d/pkg/prometheus/selector/parse.go | 2 +- src/go/plugin/go.d/pkg/prometheus/selector/parse_test.go | 2 +- src/go/plugin/go.d/pkg/prometheus/selector/selector.go | 2 +- 83 files changed, 66 insertions(+), 64 deletions(-) rename src/go/{plugin/go.d => }/pkg/matcher/README.md (100%) rename src/go/{plugin/go.d => }/pkg/matcher/cache.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/cache_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/doc.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/doc_test.go (94%) rename src/go/{plugin/go.d => }/pkg/matcher/expr.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/expr_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/glob.go (99%) rename src/go/{plugin/go.d => }/pkg/matcher/glob_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/logical.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/logical_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/matcher.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/matcher_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/regexp.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/regexp_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/simple_patterns.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/simple_patterns_test.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/string.go (100%) rename src/go/{plugin/go.d => }/pkg/matcher/string_test.go (100%) rename src/go/{plugin/go.d => }/pkg/multipath/multipath.go (100%) rename src/go/{plugin/go.d => }/pkg/multipath/multipath_test.go (100%) rename src/go/{plugin/go.d => }/pkg/multipath/testdata/data1/test-empty.conf (100%) rename src/go/{plugin/go.d => }/pkg/multipath/testdata/data1/test.conf (100%) rename src/go/{plugin/go.d => }/pkg/multipath/testdata/data2/test-empty.conf (100%) rename src/go/{plugin/go.d => }/pkg/multipath/testdata/data2/test.conf (100%) rename src/go/{plugin/go.d/agent => pkg}/netdataapi/api.go (100%) rename src/go/{plugin/go.d/agent => pkg}/netdataapi/api_test.go (100%) rename src/go/{plugin/go.d/agent => pkg}/safewriter/writer.go (100%) rename src/go/{plugin/go.d/agent => pkg}/ticker/ticker.go (100%) rename src/go/{plugin/go.d/agent => pkg}/ticker/ticket_test.go (100%) diff --git a/src/go/cmd/godplugin/main.go b/src/go/cmd/godplugin/main.go index cae9fa1b4ccfd7..961aa91d1d4417 100644 --- a/src/go/cmd/godplugin/main.go +++ b/src/go/cmd/godplugin/main.go @@ -15,9 +15,9 @@ import ( "github.com/netdata/netdata/go/plugins/logger" "github.com/netdata/netdata/go/plugins/pkg/buildinfo" "github.com/netdata/netdata/go/plugins/pkg/executable" + "github.com/netdata/netdata/go/plugins/pkg/multipath" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent" "github.com/netdata/netdata/go/plugins/plugin/go.d/cli" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath" "github.com/jessevdk/go-flags" "golang.org/x/net/http/httpproxy" diff --git a/src/go/plugin/go.d/pkg/matcher/README.md b/src/go/pkg/matcher/README.md similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/README.md rename to src/go/pkg/matcher/README.md diff --git a/src/go/plugin/go.d/pkg/matcher/cache.go b/src/go/pkg/matcher/cache.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/cache.go rename to src/go/pkg/matcher/cache.go diff --git a/src/go/plugin/go.d/pkg/matcher/cache_test.go b/src/go/pkg/matcher/cache_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/cache_test.go rename to src/go/pkg/matcher/cache_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/doc.go b/src/go/pkg/matcher/doc.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/doc.go rename to src/go/pkg/matcher/doc.go diff --git a/src/go/plugin/go.d/pkg/matcher/doc_test.go b/src/go/pkg/matcher/doc_test.go similarity index 94% rename from src/go/plugin/go.d/pkg/matcher/doc_test.go rename to src/go/pkg/matcher/doc_test.go index 4cc3944df8af74..46c7467ac88ac4 100644 --- a/src/go/plugin/go.d/pkg/matcher/doc_test.go +++ b/src/go/pkg/matcher/doc_test.go @@ -2,7 +2,9 @@ package matcher_test -import "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" +import ( + "github.com/netdata/netdata/go/plugins/pkg/matcher" +) func ExampleNew_string_format() { // create a string matcher, which perform full text match diff --git a/src/go/plugin/go.d/pkg/matcher/expr.go b/src/go/pkg/matcher/expr.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/expr.go rename to src/go/pkg/matcher/expr.go diff --git a/src/go/plugin/go.d/pkg/matcher/expr_test.go b/src/go/pkg/matcher/expr_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/expr_test.go rename to src/go/pkg/matcher/expr_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/glob.go b/src/go/pkg/matcher/glob.go similarity index 99% rename from src/go/plugin/go.d/pkg/matcher/glob.go rename to src/go/pkg/matcher/glob.go index 726c94c4517a03..75d977ff6293a9 100644 --- a/src/go/plugin/go.d/pkg/matcher/glob.go +++ b/src/go/pkg/matcher/glob.go @@ -14,7 +14,7 @@ type globMatcher string var ( errBadGlobPattern = errors.New("bad glob pattern") - erGlobPattern = regexp.MustCompile(`(?s)^(?:[*?]|\[\^?([^\\-\]]|\\.|.-.)+\]|\\.|[^\*\?\\\[])*$`) + erGlobPattern = regexp.MustCompile(`(?s)^(?:[*?]|\[\^?([^\\-\]]|\\.|.-.)+]|\\.|[^*?\\\[])*$`) ) // NewGlobMatcher create a new matcher with glob format diff --git a/src/go/plugin/go.d/pkg/matcher/glob_test.go b/src/go/pkg/matcher/glob_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/glob_test.go rename to src/go/pkg/matcher/glob_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/logical.go b/src/go/pkg/matcher/logical.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/logical.go rename to src/go/pkg/matcher/logical.go diff --git a/src/go/plugin/go.d/pkg/matcher/logical_test.go b/src/go/pkg/matcher/logical_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/logical_test.go rename to src/go/pkg/matcher/logical_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/matcher.go b/src/go/pkg/matcher/matcher.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/matcher.go rename to src/go/pkg/matcher/matcher.go diff --git a/src/go/plugin/go.d/pkg/matcher/matcher_test.go b/src/go/pkg/matcher/matcher_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/matcher_test.go rename to src/go/pkg/matcher/matcher_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/regexp.go b/src/go/pkg/matcher/regexp.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/regexp.go rename to src/go/pkg/matcher/regexp.go diff --git a/src/go/plugin/go.d/pkg/matcher/regexp_test.go b/src/go/pkg/matcher/regexp_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/regexp_test.go rename to src/go/pkg/matcher/regexp_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/simple_patterns.go b/src/go/pkg/matcher/simple_patterns.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/simple_patterns.go rename to src/go/pkg/matcher/simple_patterns.go diff --git a/src/go/plugin/go.d/pkg/matcher/simple_patterns_test.go b/src/go/pkg/matcher/simple_patterns_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/simple_patterns_test.go rename to src/go/pkg/matcher/simple_patterns_test.go diff --git a/src/go/plugin/go.d/pkg/matcher/string.go b/src/go/pkg/matcher/string.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/string.go rename to src/go/pkg/matcher/string.go diff --git a/src/go/plugin/go.d/pkg/matcher/string_test.go b/src/go/pkg/matcher/string_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/matcher/string_test.go rename to src/go/pkg/matcher/string_test.go diff --git a/src/go/plugin/go.d/pkg/multipath/multipath.go b/src/go/pkg/multipath/multipath.go similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/multipath.go rename to src/go/pkg/multipath/multipath.go diff --git a/src/go/plugin/go.d/pkg/multipath/multipath_test.go b/src/go/pkg/multipath/multipath_test.go similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/multipath_test.go rename to src/go/pkg/multipath/multipath_test.go diff --git a/src/go/plugin/go.d/pkg/multipath/testdata/data1/test-empty.conf b/src/go/pkg/multipath/testdata/data1/test-empty.conf similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/testdata/data1/test-empty.conf rename to src/go/pkg/multipath/testdata/data1/test-empty.conf diff --git a/src/go/plugin/go.d/pkg/multipath/testdata/data1/test.conf b/src/go/pkg/multipath/testdata/data1/test.conf similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/testdata/data1/test.conf rename to src/go/pkg/multipath/testdata/data1/test.conf diff --git a/src/go/plugin/go.d/pkg/multipath/testdata/data2/test-empty.conf b/src/go/pkg/multipath/testdata/data2/test-empty.conf similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/testdata/data2/test-empty.conf rename to src/go/pkg/multipath/testdata/data2/test-empty.conf diff --git a/src/go/plugin/go.d/pkg/multipath/testdata/data2/test.conf b/src/go/pkg/multipath/testdata/data2/test.conf similarity index 100% rename from src/go/plugin/go.d/pkg/multipath/testdata/data2/test.conf rename to src/go/pkg/multipath/testdata/data2/test.conf diff --git a/src/go/plugin/go.d/agent/netdataapi/api.go b/src/go/pkg/netdataapi/api.go similarity index 100% rename from src/go/plugin/go.d/agent/netdataapi/api.go rename to src/go/pkg/netdataapi/api.go diff --git a/src/go/plugin/go.d/agent/netdataapi/api_test.go b/src/go/pkg/netdataapi/api_test.go similarity index 100% rename from src/go/plugin/go.d/agent/netdataapi/api_test.go rename to src/go/pkg/netdataapi/api_test.go diff --git a/src/go/plugin/go.d/agent/safewriter/writer.go b/src/go/pkg/safewriter/writer.go similarity index 100% rename from src/go/plugin/go.d/agent/safewriter/writer.go rename to src/go/pkg/safewriter/writer.go diff --git a/src/go/plugin/go.d/agent/ticker/ticker.go b/src/go/pkg/ticker/ticker.go similarity index 100% rename from src/go/plugin/go.d/agent/ticker/ticker.go rename to src/go/pkg/ticker/ticker.go diff --git a/src/go/plugin/go.d/agent/ticker/ticket_test.go b/src/go/pkg/ticker/ticket_test.go similarity index 100% rename from src/go/plugin/go.d/agent/ticker/ticket_test.go rename to src/go/pkg/ticker/ticket_test.go diff --git a/src/go/plugin/go.d/agent/agent.go b/src/go/plugin/go.d/agent/agent.go index b44021bb693f5d..014f544b5d6ad3 100644 --- a/src/go/plugin/go.d/agent/agent.go +++ b/src/go/plugin/go.d/agent/agent.go @@ -13,6 +13,9 @@ import ( "time" "github.com/netdata/netdata/go/plugins/logger" + "github.com/netdata/netdata/go/plugins/pkg/multipath" + "github.com/netdata/netdata/go/plugins/pkg/netdataapi" + "github.com/netdata/netdata/go/plugins/pkg/safewriter" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/filelock" @@ -20,9 +23,6 @@ import ( "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/functions" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/jobmgr" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath" "github.com/mattn/go-isatty" ) diff --git a/src/go/plugin/go.d/agent/agent_test.go b/src/go/plugin/go.d/agent/agent_test.go index 9096b9015ee1ae..39e12f751c36f9 100644 --- a/src/go/plugin/go.d/agent/agent_test.go +++ b/src/go/plugin/go.d/agent/agent_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" + "github.com/netdata/netdata/go/plugins/pkg/safewriter" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter" "github.com/stretchr/testify/assert" ) diff --git a/src/go/plugin/go.d/agent/discovery/sd/conffile.go b/src/go/plugin/go.d/agent/discovery/sd/conffile.go index e08a4021bdf638..60a7208d2ad204 100644 --- a/src/go/plugin/go.d/agent/discovery/sd/conffile.go +++ b/src/go/plugin/go.d/agent/discovery/sd/conffile.go @@ -7,7 +7,7 @@ import ( "os" "github.com/netdata/netdata/go/plugins/logger" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath" + "github.com/netdata/netdata/go/plugins/pkg/multipath" ) type confFile struct { diff --git a/src/go/plugin/go.d/agent/discovery/sd/pipeline/funcmap.go b/src/go/plugin/go.d/agent/discovery/sd/pipeline/funcmap.go index 228d69bafb1309..f94a5c24a63b8c 100644 --- a/src/go/plugin/go.d/agent/discovery/sd/pipeline/funcmap.go +++ b/src/go/plugin/go.d/agent/discovery/sd/pipeline/funcmap.go @@ -7,7 +7,7 @@ import ( "strconv" "text/template" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/Masterminds/sprig/v3" "github.com/bmatcuk/doublestar/v4" diff --git a/src/go/plugin/go.d/agent/discovery/sd/sd.go b/src/go/plugin/go.d/agent/discovery/sd/sd.go index 687ebfba8d1ae7..90207219d54cc3 100644 --- a/src/go/plugin/go.d/agent/discovery/sd/sd.go +++ b/src/go/plugin/go.d/agent/discovery/sd/sd.go @@ -9,9 +9,9 @@ import ( "sync" "github.com/netdata/netdata/go/plugins/logger" + "github.com/netdata/netdata/go/plugins/pkg/multipath" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/discovery/sd/pipeline" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath" "gopkg.in/yaml.v2" ) diff --git a/src/go/plugin/go.d/agent/functions/manager.go b/src/go/plugin/go.d/agent/functions/manager.go index b7cdecd6ac5f42..fe4228a75a4426 100644 --- a/src/go/plugin/go.d/agent/functions/manager.go +++ b/src/go/plugin/go.d/agent/functions/manager.go @@ -13,8 +13,8 @@ import ( "time" "github.com/netdata/netdata/go/plugins/logger" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter" + "github.com/netdata/netdata/go/plugins/pkg/netdataapi" + "github.com/netdata/netdata/go/plugins/pkg/safewriter" ) func NewManager() *Manager { diff --git a/src/go/plugin/go.d/agent/jobmgr/manager.go b/src/go/plugin/go.d/agent/jobmgr/manager.go index 59947be77f9cbb..b2ba7a2c7964c9 100644 --- a/src/go/plugin/go.d/agent/jobmgr/manager.go +++ b/src/go/plugin/go.d/agent/jobmgr/manager.go @@ -12,12 +12,12 @@ import ( "time" "github.com/netdata/netdata/go/plugins/logger" + "github.com/netdata/netdata/go/plugins/pkg/netdataapi" + "github.com/netdata/netdata/go/plugins/pkg/safewriter" + "github.com/netdata/netdata/go/plugins/pkg/ticker" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/functions" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/ticker" "github.com/mattn/go-isatty" "gopkg.in/yaml.v2" diff --git a/src/go/plugin/go.d/agent/jobmgr/sim_test.go b/src/go/plugin/go.d/agent/jobmgr/sim_test.go index c0094188536122..63369c33ffad92 100644 --- a/src/go/plugin/go.d/agent/jobmgr/sim_test.go +++ b/src/go/plugin/go.d/agent/jobmgr/sim_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" + "github.com/netdata/netdata/go/plugins/pkg/netdataapi" + "github.com/netdata/netdata/go/plugins/pkg/safewriter" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/confgroup" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/safewriter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/src/go/plugin/go.d/agent/module/job.go b/src/go/plugin/go.d/agent/module/job.go index aa39d1daed7d90..3db06ef000e8b7 100644 --- a/src/go/plugin/go.d/agent/module/job.go +++ b/src/go/plugin/go.d/agent/module/job.go @@ -16,7 +16,7 @@ import ( "time" "github.com/netdata/netdata/go/plugins/logger" - "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/netdataapi" + "github.com/netdata/netdata/go/plugins/pkg/netdataapi" ) var obsoleteLock = &sync.Mutex{} diff --git a/src/go/plugin/go.d/examples/simple/main.go b/src/go/plugin/go.d/examples/simple/main.go index 215e91f14e1ae6..ce1d7ec806171c 100644 --- a/src/go/plugin/go.d/examples/simple/main.go +++ b/src/go/plugin/go.d/examples/simple/main.go @@ -10,13 +10,13 @@ import ( "os" "path" + "github.com/jessevdk/go-flags" + "github.com/netdata/netdata/go/plugins/logger" + "github.com/netdata/netdata/go/plugins/pkg/multipath" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/cli" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/multipath" - - "github.com/jessevdk/go-flags" ) var version = "v0.0.1-example" diff --git a/src/go/plugin/go.d/modules/activemq/activemq.go b/src/go/plugin/go.d/modules/activemq/activemq.go index 06b30f1f5c99c5..9dfa0ffdadac03 100644 --- a/src/go/plugin/go.d/modules/activemq/activemq.go +++ b/src/go/plugin/go.d/modules/activemq/activemq.go @@ -7,9 +7,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/activemq/init.go b/src/go/plugin/go.d/modules/activemq/init.go index a0198ac1101398..2797af7cb1fb5f 100644 --- a/src/go/plugin/go.d/modules/activemq/init.go +++ b/src/go/plugin/go.d/modules/activemq/init.go @@ -5,7 +5,7 @@ package activemq import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (a *ActiveMQ) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/beanstalk/beanstalk.go b/src/go/plugin/go.d/modules/beanstalk/beanstalk.go index 50420e703df424..29e5b62bd9224a 100644 --- a/src/go/plugin/go.d/modules/beanstalk/beanstalk.go +++ b/src/go/plugin/go.d/modules/beanstalk/beanstalk.go @@ -9,9 +9,9 @@ import ( "time" "github.com/netdata/netdata/go/plugins/logger" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) //go:embed "config_schema.json" diff --git a/src/go/plugin/go.d/modules/beanstalk/init.go b/src/go/plugin/go.d/modules/beanstalk/init.go index 50916b3a77a247..0ae61c404cbef8 100644 --- a/src/go/plugin/go.d/modules/beanstalk/init.go +++ b/src/go/plugin/go.d/modules/beanstalk/init.go @@ -5,7 +5,7 @@ package beanstalk import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (b *Beanstalk) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/bind/bind.go b/src/go/plugin/go.d/modules/bind/bind.go index 522c265f709fb5..b774a024bb311c 100644 --- a/src/go/plugin/go.d/modules/bind/bind.go +++ b/src/go/plugin/go.d/modules/bind/bind.go @@ -8,9 +8,9 @@ import ( "net/http" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/bind/init.go b/src/go/plugin/go.d/modules/bind/init.go index 60f5161e3c46d7..7a02b1bf731aff 100644 --- a/src/go/plugin/go.d/modules/bind/init.go +++ b/src/go/plugin/go.d/modules/bind/init.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (b *Bind) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/coredns/coredns.go b/src/go/plugin/go.d/modules/coredns/coredns.go index aa86258d66eae9..ee807a196cee2b 100644 --- a/src/go/plugin/go.d/modules/coredns/coredns.go +++ b/src/go/plugin/go.d/modules/coredns/coredns.go @@ -7,9 +7,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" diff --git a/src/go/plugin/go.d/modules/coredns/init.go b/src/go/plugin/go.d/modules/coredns/init.go index 48c76b238f7fc9..2cb46240c2d39d 100644 --- a/src/go/plugin/go.d/modules/coredns/init.go +++ b/src/go/plugin/go.d/modules/coredns/init.go @@ -5,7 +5,7 @@ package coredns import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/filecheck/filecheck.go b/src/go/plugin/go.d/modules/filecheck/filecheck.go index 094fed2044a349..c5124adf6c16f2 100644 --- a/src/go/plugin/go.d/modules/filecheck/filecheck.go +++ b/src/go/plugin/go.d/modules/filecheck/filecheck.go @@ -6,9 +6,9 @@ import ( _ "embed" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) //go:embed "config_schema.json" diff --git a/src/go/plugin/go.d/modules/filecheck/init.go b/src/go/plugin/go.d/modules/filecheck/init.go index 20b30964ff173d..2168e2af8dba36 100644 --- a/src/go/plugin/go.d/modules/filecheck/init.go +++ b/src/go/plugin/go.d/modules/filecheck/init.go @@ -5,7 +5,7 @@ package filecheck import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (f *Filecheck) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/fluentd/fluentd.go b/src/go/plugin/go.d/modules/fluentd/fluentd.go index 96378b13e27b65..ab03156071108c 100644 --- a/src/go/plugin/go.d/modules/fluentd/fluentd.go +++ b/src/go/plugin/go.d/modules/fluentd/fluentd.go @@ -7,9 +7,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/fluentd/init.go b/src/go/plugin/go.d/modules/fluentd/init.go index 1783015dd8233a..2e3d5326003710 100644 --- a/src/go/plugin/go.d/modules/fluentd/init.go +++ b/src/go/plugin/go.d/modules/fluentd/init.go @@ -5,7 +5,7 @@ package fluentd import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/httpcheck/init.go b/src/go/plugin/go.d/modules/httpcheck/init.go index ec95d9236a0935..3dc38c8238ef6a 100644 --- a/src/go/plugin/go.d/modules/httpcheck/init.go +++ b/src/go/plugin/go.d/modules/httpcheck/init.go @@ -8,8 +8,8 @@ import ( "net/http" "regexp" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/mongodb/mongodb.go b/src/go/plugin/go.d/modules/mongodb/mongodb.go index cb8154244ac565..e3feec676d9ed3 100644 --- a/src/go/plugin/go.d/modules/mongodb/mongodb.go +++ b/src/go/plugin/go.d/modules/mongodb/mongodb.go @@ -8,9 +8,9 @@ import ( "sync" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) //go:embed "config_schema.json" diff --git a/src/go/plugin/go.d/modules/mongodb/mongodb_test.go b/src/go/plugin/go.d/modules/mongodb/mongodb_test.go index 835ea20e208c10..fdbf8816c7bef9 100644 --- a/src/go/plugin/go.d/modules/mongodb/mongodb_test.go +++ b/src/go/plugin/go.d/modules/mongodb/mongodb_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/src/go/plugin/go.d/modules/openvpn/init.go b/src/go/plugin/go.d/modules/openvpn/init.go index 563edbaa6eafce..b7ff79ace0c62d 100644 --- a/src/go/plugin/go.d/modules/openvpn/init.go +++ b/src/go/plugin/go.d/modules/openvpn/init.go @@ -3,8 +3,8 @@ package openvpn import ( + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/openvpn/client" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/socket" ) diff --git a/src/go/plugin/go.d/modules/openvpn/openvpn.go b/src/go/plugin/go.d/modules/openvpn/openvpn.go index 331321961f9b68..4dd86d0511a75b 100644 --- a/src/go/plugin/go.d/modules/openvpn/openvpn.go +++ b/src/go/plugin/go.d/modules/openvpn/openvpn.go @@ -6,10 +6,10 @@ import ( _ "embed" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/openvpn/client" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/socket" ) diff --git a/src/go/plugin/go.d/modules/openvpn/openvpn_test.go b/src/go/plugin/go.d/modules/openvpn/openvpn_test.go index d81747cebf69bf..86308120435965 100644 --- a/src/go/plugin/go.d/modules/openvpn/openvpn_test.go +++ b/src/go/plugin/go.d/modules/openvpn/openvpn_test.go @@ -6,9 +6,9 @@ import ( "os" "testing" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/openvpn/client" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/socket" "github.com/stretchr/testify/assert" diff --git a/src/go/plugin/go.d/modules/openvpn_status_log/init.go b/src/go/plugin/go.d/modules/openvpn_status_log/init.go index b972cb863d47be..c603736bf83d5f 100644 --- a/src/go/plugin/go.d/modules/openvpn_status_log/init.go +++ b/src/go/plugin/go.d/modules/openvpn_status_log/init.go @@ -5,7 +5,7 @@ package openvpn_status_log import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (o *OpenVPNStatusLog) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/openvpn_status_log/openvpn.go b/src/go/plugin/go.d/modules/openvpn_status_log/openvpn.go index 7b2914df98b11a..9565d4d01ae778 100644 --- a/src/go/plugin/go.d/modules/openvpn_status_log/openvpn.go +++ b/src/go/plugin/go.d/modules/openvpn_status_log/openvpn.go @@ -6,8 +6,8 @@ import ( _ "embed" "errors" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) //go:embed "config_schema.json" diff --git a/src/go/plugin/go.d/modules/openvpn_status_log/openvpn_test.go b/src/go/plugin/go.d/modules/openvpn_status_log/openvpn_test.go index f3d852d5a22ae0..36ac45e5b02c3c 100644 --- a/src/go/plugin/go.d/modules/openvpn_status_log/openvpn_test.go +++ b/src/go/plugin/go.d/modules/openvpn_status_log/openvpn_test.go @@ -7,8 +7,8 @@ import ( "strings" "testing" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/src/go/plugin/go.d/modules/postgres/init.go b/src/go/plugin/go.d/modules/postgres/init.go index e2bbecc168bbfa..35c791ae20a9f2 100644 --- a/src/go/plugin/go.d/modules/postgres/init.go +++ b/src/go/plugin/go.d/modules/postgres/init.go @@ -5,7 +5,7 @@ package postgres import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (p *Postgres) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/postgres/postgres.go b/src/go/plugin/go.d/modules/postgres/postgres.go index 54001b18957a86..0e487ac354bd2c 100644 --- a/src/go/plugin/go.d/modules/postgres/postgres.go +++ b/src/go/plugin/go.d/modules/postgres/postgres.go @@ -9,9 +9,9 @@ import ( "sync" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/metrics" "github.com/jackc/pgx/v5/stdlib" diff --git a/src/go/plugin/go.d/modules/postgres/postgres_test.go b/src/go/plugin/go.d/modules/postgres/postgres_test.go index 7e91b288f00787..6331b0b482ef3c 100644 --- a/src/go/plugin/go.d/modules/postgres/postgres_test.go +++ b/src/go/plugin/go.d/modules/postgres/postgres_test.go @@ -12,8 +12,8 @@ import ( "strings" "testing" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/DATA-DOG/go-sqlmock" "github.com/stretchr/testify/assert" diff --git a/src/go/plugin/go.d/modules/prometheus/init.go b/src/go/plugin/go.d/modules/prometheus/init.go index d4e6943d4e6763..4171e9fdc3e7df 100644 --- a/src/go/plugin/go.d/modules/prometheus/init.go +++ b/src/go/plugin/go.d/modules/prometheus/init.go @@ -7,7 +7,7 @@ import ( "fmt" "os" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/prometheus/prometheus.go b/src/go/plugin/go.d/modules/prometheus/prometheus.go index b7a1d26b0a3696..abf22e6c5833bd 100644 --- a/src/go/plugin/go.d/modules/prometheus/prometheus.go +++ b/src/go/plugin/go.d/modules/prometheus/prometheus.go @@ -7,9 +7,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus/selector" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" diff --git a/src/go/plugin/go.d/modules/pulsar/init.go b/src/go/plugin/go.d/modules/pulsar/init.go index f731a861b096c7..c98c3c1dfb1f99 100644 --- a/src/go/plugin/go.d/modules/pulsar/init.go +++ b/src/go/plugin/go.d/modules/pulsar/init.go @@ -5,7 +5,7 @@ package pulsar import ( "errors" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/pulsar/pulsar.go b/src/go/plugin/go.d/modules/pulsar/pulsar.go index 5728ef6a42d17e..43d5d63c695631 100644 --- a/src/go/plugin/go.d/modules/pulsar/pulsar.go +++ b/src/go/plugin/go.d/modules/pulsar/pulsar.go @@ -8,9 +8,9 @@ import ( "sync" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/prometheus" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" ) diff --git a/src/go/plugin/go.d/modules/pulsar/pulsar_test.go b/src/go/plugin/go.d/modules/pulsar/pulsar_test.go index 644a6f464a810e..865a41cb3b9a5f 100644 --- a/src/go/plugin/go.d/modules/pulsar/pulsar_test.go +++ b/src/go/plugin/go.d/modules/pulsar/pulsar_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/tlscfg" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" diff --git a/src/go/plugin/go.d/modules/smartctl/init.go b/src/go/plugin/go.d/modules/smartctl/init.go index 6d3731a1801489..a132d71f1c0f12 100644 --- a/src/go/plugin/go.d/modules/smartctl/init.go +++ b/src/go/plugin/go.d/modules/smartctl/init.go @@ -8,7 +8,7 @@ import ( "path/filepath" "github.com/netdata/netdata/go/plugins/pkg/executable" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (s *Smartctl) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/smartctl/smartctl.go b/src/go/plugin/go.d/modules/smartctl/smartctl.go index 6e561aac8714c5..a639c104d9b596 100644 --- a/src/go/plugin/go.d/modules/smartctl/smartctl.go +++ b/src/go/plugin/go.d/modules/smartctl/smartctl.go @@ -7,9 +7,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/tidwall/gjson" ) diff --git a/src/go/plugin/go.d/modules/snmp/init.go b/src/go/plugin/go.d/modules/snmp/init.go index 511a96b262709a..32b0ce6b1a15cb 100644 --- a/src/go/plugin/go.d/modules/snmp/init.go +++ b/src/go/plugin/go.d/modules/snmp/init.go @@ -8,10 +8,10 @@ import ( "strings" "time" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" - "github.com/google/uuid" "github.com/gosnmp/gosnmp" + + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (s *SNMP) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/snmp/snmp.go b/src/go/plugin/go.d/modules/snmp/snmp.go index edd2473857f299..9c3b76a647a326 100644 --- a/src/go/plugin/go.d/modules/snmp/snmp.go +++ b/src/go/plugin/go.d/modules/snmp/snmp.go @@ -6,9 +6,9 @@ import ( _ "embed" "errors" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/vnodes" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/gosnmp/gosnmp" ) diff --git a/src/go/plugin/go.d/modules/systemdunits/init.go b/src/go/plugin/go.d/modules/systemdunits/init.go index 8a1b579c1a127a..5196e11d833830 100644 --- a/src/go/plugin/go.d/modules/systemdunits/init.go +++ b/src/go/plugin/go.d/modules/systemdunits/init.go @@ -9,7 +9,7 @@ import ( "errors" "strings" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) func (s *SystemdUnits) validateConfig() error { diff --git a/src/go/plugin/go.d/modules/systemdunits/systemdunits.go b/src/go/plugin/go.d/modules/systemdunits/systemdunits.go index 39b9bd1a408166..d7ae874dfc55fe 100644 --- a/src/go/plugin/go.d/modules/systemdunits/systemdunits.go +++ b/src/go/plugin/go.d/modules/systemdunits/systemdunits.go @@ -10,9 +10,9 @@ import ( "errors" "time" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/confopt" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/coreos/go-systemd/v22/dbus" ) diff --git a/src/go/plugin/go.d/modules/vsphere/match/match.go b/src/go/plugin/go.d/modules/vsphere/match/match.go index 969b5d7c59c9b2..8e63a7104ae834 100644 --- a/src/go/plugin/go.d/modules/vsphere/match/match.go +++ b/src/go/plugin/go.d/modules/vsphere/match/match.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" + "github.com/netdata/netdata/go/plugins/pkg/matcher" rs "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/vsphere/resources" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) type HostMatcher interface { diff --git a/src/go/plugin/go.d/modules/vsphere/match/match_test.go b/src/go/plugin/go.d/modules/vsphere/match/match_test.go index c11697783f5a4d..a85f9f8f3dd0cd 100644 --- a/src/go/plugin/go.d/modules/vsphere/match/match_test.go +++ b/src/go/plugin/go.d/modules/vsphere/match/match_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/vsphere/resources" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" "github.com/stretchr/testify/assert" ) diff --git a/src/go/plugin/go.d/modules/weblog/init.go b/src/go/plugin/go.d/modules/weblog/init.go index c76e43f30da41f..f927e77265e477 100644 --- a/src/go/plugin/go.d/modules/weblog/init.go +++ b/src/go/plugin/go.d/modules/weblog/init.go @@ -7,8 +7,8 @@ import ( "fmt" "strings" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/logs" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) type pattern struct { diff --git a/src/go/plugin/go.d/pkg/README.md b/src/go/plugin/go.d/pkg/README.md index 34561395f0e6c7..9163709e603fbf 100644 --- a/src/go/plugin/go.d/pkg/README.md +++ b/src/go/plugin/go.d/pkg/README.md @@ -13,7 +13,7 @@ learn_rel_path: "Developers/External plugins/go.d.plugin/Helper Packages" - if you parse an application log files, then [`log`](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/logs) is handy. - if you need filtering - check [`matcher`](/src/go/plugin/go.d/pkg/matcher). + check [`matcher`](/src/go/pkg/matcher). - if you collect metrics from an HTTP endpoint use [`web`](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/web). - if you collect metrics from a prometheus endpoint, then [`prometheus`](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/pkg/prometheus) diff --git a/src/go/plugin/go.d/pkg/prometheus/selector/parse.go b/src/go/plugin/go.d/pkg/prometheus/selector/parse.go index 81e970c48c73ab..4f0aaf4dc73a96 100644 --- a/src/go/plugin/go.d/pkg/prometheus/selector/parse.go +++ b/src/go/plugin/go.d/pkg/prometheus/selector/parse.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" ) var ( diff --git a/src/go/plugin/go.d/pkg/prometheus/selector/parse_test.go b/src/go/plugin/go.d/pkg/prometheus/selector/parse_test.go index 1a1f8ab790b60c..a1876481d4e2b8 100644 --- a/src/go/plugin/go.d/pkg/prometheus/selector/parse_test.go +++ b/src/go/plugin/go.d/pkg/prometheus/selector/parse_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" diff --git a/src/go/plugin/go.d/pkg/prometheus/selector/selector.go b/src/go/plugin/go.d/pkg/prometheus/selector/selector.go index a42b846f2a2c98..01d0f0731db10a 100644 --- a/src/go/plugin/go.d/pkg/prometheus/selector/selector.go +++ b/src/go/plugin/go.d/pkg/prometheus/selector/selector.go @@ -3,7 +3,7 @@ package selector import ( - "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/matcher" "github.com/prometheus/prometheus/model/labels" )