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/rpc | |
parent | 7884349f27ed750825a0f4dea59af8964e182651 (diff) |
Move config interface to the interfaces folder. Initial redis plugin
structure
Diffstat (limited to 'plugins/rpc')
-rwxr-xr-x | plugins/rpc/plugin.go | 4 | ||||
-rw-r--r-- | plugins/rpc/tests/plugin1.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/rpc/plugin.go b/plugins/rpc/plugin.go index c8e63496..8d308561 100755 --- a/plugins/rpc/plugin.go +++ b/plugins/rpc/plugin.go @@ -8,9 +8,9 @@ import ( "github.com/spiral/endure" "github.com/spiral/errors" "github.com/spiral/goridge/v3" + config2 "github.com/spiral/roadrunner/v2/interfaces/config" "github.com/spiral/roadrunner/v2/interfaces/log" rpc_ "github.com/spiral/roadrunner/v2/interfaces/rpc" - "github.com/spiral/roadrunner/v2/plugins/config" ) // PluginName contains default plugin name. @@ -32,7 +32,7 @@ type Plugin struct { } // Init rpc service. Must return true if service is enabled. -func (s *Plugin) Init(cfg config.Configurer, log log.Logger) error { +func (s *Plugin) Init(cfg config2.Configurer, log log.Logger) error { const op = errors.Op("RPC Init") if !cfg.Has(PluginName) { return errors.E(op, errors.Disabled) diff --git a/plugins/rpc/tests/plugin1.go b/plugins/rpc/tests/plugin1.go index 79e98ed4..dcb256fa 100644 --- a/plugins/rpc/tests/plugin1.go +++ b/plugins/rpc/tests/plugin1.go @@ -3,14 +3,14 @@ package tests import ( "fmt" - "github.com/spiral/roadrunner/v2/plugins/config" + config2 "github.com/spiral/roadrunner/v2/interfaces/config" ) 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 } |