diff options
author | Valery Piashchynski <[email protected]> | 2020-12-17 18:23:19 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-17 18:23:19 +0300 |
commit | fbd5adde5abae6f7adb7fcdafc226bcd3480d498 (patch) | |
tree | 59ce0499568e0d4fd889d43de9a5eb1b17907a8e /plugins/metrics | |
parent | 7884349f27ed750825a0f4dea59af8964e182651 (diff) |
Move config interface to the interfaces folder. Initial redis plugin
structure
Diffstat (limited to 'plugins/metrics')
-rw-r--r-- | plugins/metrics/plugin.go | 4 | ||||
-rw-r--r-- | plugins/metrics/tests/plugin1.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/metrics/plugin.go b/plugins/metrics/plugin.go index c115826b..956166ee 100644 --- a/plugins/metrics/plugin.go +++ b/plugins/metrics/plugin.go @@ -11,9 +11,9 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/spiral/endure" "github.com/spiral/errors" + config2 "github.com/spiral/roadrunner/v2/interfaces/config" "github.com/spiral/roadrunner/v2/interfaces/log" "github.com/spiral/roadrunner/v2/interfaces/metrics" - "github.com/spiral/roadrunner/v2/plugins/config" "golang.org/x/sys/cpu" ) @@ -40,7 +40,7 @@ type Plugin struct { } // Init service. -func (m *Plugin) Init(cfg config.Configurer, log log.Logger) error { +func (m *Plugin) Init(cfg config2.Configurer, log log.Logger) error { const op = errors.Op("Metrics Init") err := cfg.UnmarshalKey(PluginName, &m.cfg) if err != nil { diff --git a/plugins/metrics/tests/plugin1.go b/plugins/metrics/tests/plugin1.go index b48c415d..08dd2593 100644 --- a/plugins/metrics/tests/plugin1.go +++ b/plugins/metrics/tests/plugin1.go @@ -2,15 +2,15 @@ package tests import ( "github.com/prometheus/client_golang/prometheus" - "github.com/spiral/roadrunner/v2/plugins/config" + config2 "github.com/spiral/roadrunner/v2/interfaces/config" ) // Gauge ////////////// type Plugin1 struct { - config config.Configurer + config config2.Configurer } -func (p1 *Plugin1) Init(cfg config.Configurer) error { +func (p1 *Plugin1) Init(cfg config2.Configurer) error { p1.config = cfg return nil } |