From d0ec24066b5fbb4e3accc9c45f72f7c638b35dba Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 5 Jun 2021 13:21:35 +0300 Subject: - Websockets bug fixing and polishing Signed-off-by: Valery Piashchynski --- pkg/pubsub/interface.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'pkg/pubsub') diff --git a/pkg/pubsub/interface.go b/pkg/pubsub/interface.go index 18c1a80c..2d5d9595 100644 --- a/pkg/pubsub/interface.go +++ b/pkg/pubsub/interface.go @@ -2,6 +2,10 @@ package pubsub import "github.com/spiral/roadrunner/v2/pkg/pubsub/message" +/* +This interface is in BETA. It might be changed. +*/ + // PubSub ... type PubSub interface { Publisher @@ -10,15 +14,20 @@ type PubSub interface { } // Subscriber defines the ability to operate as message passing broker. +// BETA interface type Subscriber interface { // Subscribe broker to one or multiple topics. - Subscribe(topics ...string) error + Subscribe(connectionID string, topics ...string) error // Unsubscribe from one or multiply topics - Unsubscribe(topics ...string) error + Unsubscribe(connectionID string, topics ...string) error + + // Connections returns all connections associated with the particular topic + Connections(topic string, ret map[string]struct{}) } // Publisher publish one or more messages +// BETA interface type Publisher interface { // Publish one or multiple Channel. Publish(messages []byte) error -- cgit v1.2.3