summaryrefslogtreecommitdiff
path: root/plugins/broadcast/ws/subscriber.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-05-27 00:09:33 +0300
committerValery Piashchynski <[email protected]>2021-05-27 00:09:33 +0300
commitdc3c5455e5c9b32737a0620c8bdb8bda0226dba7 (patch)
tree6ba562da6de7f32a8d528b72cbb56a8bc98c1b30 /plugins/broadcast/ws/subscriber.go
parentd2e9d8320857f5768c54843a43ad16f59d6a3e8f (diff)
- Update all main abstractions
- Desighn a new interfaces responsible for the whole PubSub - New plugin - websockets Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/broadcast/ws/subscriber.go')
-rw-r--r--plugins/broadcast/ws/subscriber.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/plugins/broadcast/ws/subscriber.go b/plugins/broadcast/ws/subscriber.go
deleted file mode 100644
index 660efdca..00000000
--- a/plugins/broadcast/ws/subscriber.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package ws
-
-import (
- "github.com/gofiber/fiber/v2"
- "github.com/spiral/roadrunner/v2/plugins/broadcast"
- "github.com/spiral/roadrunner/v2/plugins/broadcast/ws/connection"
-)
-
-type Subscriber struct {
- connections map[string]*connection.Connection
- storage broadcast.Storage
-}
-
-// config
-//
-func NewWSSubscriber(storage broadcast.Storage) (broadcast.Subscriber, error) {
- m := make(map[string]*connection.Connection)
-
- go func() {
- app := fiber.New()
- app.Use("/ws", wsMiddleware)
- app.Listen(":8080")
- }()
-
- return &Subscriber{
- connections: m,
- storage: storage,
- }, nil
-}
-
-func (s *Subscriber) Subscribe(topics ...string) error {
- panic("implement me")
-}
-
-func (s *Subscriber) SubscribePattern(pattern string) error {
- panic("implement me")
-}
-
-func (s *Subscriber) Unsubscribe(topics ...string) error {
- panic("implement me")
-}
-
-func (s *Subscriber) UnsubscribePattern(pattern string) error {
- panic("implement me")
-}
-
-func (s *Subscriber) Publish(messages ...*broadcast.Message) error {
- s.storage.GetConnection(messages[9].Topic)
- return nil
-}