diff options
author | Valery Piashchynski <[email protected]> | 2021-06-14 17:36:44 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-14 17:36:44 +0300 |
commit | a38a4e65c16c61f792d8073c5da5f4b391690c07 (patch) | |
tree | ee860c0e959c34cd9092923acf503a2017b4713e /plugins/kv/drivers/redis/plugin.go | |
parent | dc8ed203c247afd684f198ebbac103a10bfad72a (diff) | |
parent | 9748651763415c417eaa339920cba031d418fda6 (diff) |
#723 fix(redis, ws): redis driver not available
#723 fix(redis, ws): redis driver not available
Diffstat (limited to 'plugins/kv/drivers/redis/plugin.go')
-rw-r--r-- | plugins/kv/drivers/redis/plugin.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/plugins/kv/drivers/redis/plugin.go b/plugins/kv/drivers/redis/plugin.go deleted file mode 100644 index 3694c5a7..00000000 --- a/plugins/kv/drivers/redis/plugin.go +++ /dev/null @@ -1,51 +0,0 @@ -package redis - -import ( - "github.com/spiral/errors" - "github.com/spiral/roadrunner/v2/plugins/config" - "github.com/spiral/roadrunner/v2/plugins/kv" - "github.com/spiral/roadrunner/v2/plugins/logger" -) - -const PluginName = "redis" - -// Plugin BoltDB K/V storage. -type Plugin struct { - cfgPlugin config.Configurer - // logger - log logger.Logger -} - -func (s *Plugin) Init(log logger.Logger, cfg config.Configurer) error { - if !cfg.Has(kv.PluginName) { - return errors.E(errors.Disabled) - } - - s.log = log - s.cfgPlugin = cfg - return nil -} - -// Serve is noop here -func (s *Plugin) Serve() chan error { - return make(chan error) -} - -func (s *Plugin) Stop() error { - return nil -} - -func (s *Plugin) Provide(key string) (kv.Storage, error) { - const op = errors.Op("redis_plugin_provide") - st, err := NewRedisDriver(s.log, key, s.cfgPlugin) - if err != nil { - return nil, errors.E(op, err) - } - - return st, nil -} - -// Name returns plugin name -func (s *Plugin) Name() string { - return PluginName -} |