summaryrefslogtreecommitdiff
path: root/plugins/broadcast/memory/driver.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-05-20 22:46:19 +0300
committerValery Piashchynski <[email protected]>2021-05-20 22:46:19 +0300
commitd2e9d8320857f5768c54843a43ad16f59d6a3e8f (patch)
treef6f46e688b6005b2b0ea10c7238e925c0b58f25a /plugins/broadcast/memory/driver.go
parentf85172106b4723b705aa75c3c310e8cebd050a8d (diff)
- Update linters
- Implement base interfaces - Implement BST search algo for the in-memory storage Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/broadcast/memory/driver.go')
-rw-r--r--plugins/broadcast/memory/driver.go28
1 files changed, 9 insertions, 19 deletions
diff --git a/plugins/broadcast/memory/driver.go b/plugins/broadcast/memory/driver.go
index 2eb45c8e..80527e4b 100644
--- a/plugins/broadcast/memory/driver.go
+++ b/plugins/broadcast/memory/driver.go
@@ -1,39 +1,29 @@
package memory
-import "github.com/spiral/roadrunner/v2/plugins/broadcast"
+import (
+ "github.com/spiral/roadrunner/v2/plugins/broadcast"
+)
type Driver struct {
}
-func NewInMemoryDriver() broadcast.Subscriber {
+func NewInMemoryDriver() broadcast.Storage {
b := &Driver{}
return b
}
-func (d *Driver) Serve() error {
+func (d *Driver) Store(uuid string, topics ...string) {
panic("implement me")
}
-func (d *Driver) Stop() {
+func (d *Driver) StorePattern(uuid string, pattern string) {
panic("implement me")
}
-func (d *Driver) Subscribe(upstream chan *broadcast.Message, topics ...string) error {
+func (d *Driver) GetConnection(pattern string) []string {
panic("implement me")
}
-func (d *Driver) SubscribePattern(upstream chan *broadcast.Message, pattern string) error {
- panic("implement me")
-}
-
-func (d *Driver) Unsubscribe(upstream chan *broadcast.Message, topics ...string) error {
- panic("implement me")
-}
-
-func (d *Driver) UnsubscribePattern(upstream chan *broadcast.Message, pattern string) error {
- panic("implement me")
-}
-
-func (d *Driver) Publish(messages ...*broadcast.Message) error {
- panic("implement me")
+func (d *Driver) Construct(key string) (broadcast.Storage, error) {
+ return nil, nil
}