diff options
Diffstat (limited to 'plugins/broadcast/ws/subscriber.go')
-rw-r--r-- | plugins/broadcast/ws/subscriber.go | 50 |
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 -} |