summaryrefslogtreecommitdiff
path: root/plugins/memory/plugin.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-14 16:39:02 +0300
committerValery Piashchynski <[email protected]>2021-06-14 16:39:02 +0300
commit75ab1e16c64cfd0a6424fe4c546fdbc5e1b992dd (patch)
tree1e9a910071d20021ad0f7ef4fe6099bac6a341ef /plugins/memory/plugin.go
parentdc8ed203c247afd684f198ebbac103a10bfad72a (diff)
- Rework redis with ws plugins
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memory/plugin.go')
-rw-r--r--plugins/memory/plugin.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/memory/plugin.go b/plugins/memory/plugin.go
new file mode 100644
index 00000000..650f0b4b
--- /dev/null
+++ b/plugins/memory/plugin.go
@@ -0,0 +1,25 @@
+package memory
+
+import (
+ "github.com/spiral/roadrunner/v2/pkg/pubsub"
+ "github.com/spiral/roadrunner/v2/plugins/logger"
+)
+
+const PluginName string = "memory"
+
+type Plugin struct {
+ log logger.Logger
+}
+
+func (p *Plugin) Init(log logger.Logger) error {
+ p.log = log
+ return nil
+}
+
+func (p *Plugin) PSProvide(key string) (pubsub.PubSub, error) {
+ return NewPubSubDriver(p.log, key)
+}
+
+func (p *Plugin) Name() string {
+ return PluginName
+}