diff options
author | Valery Piashchynski <[email protected]> | 2021-06-05 13:21:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-05 13:21:35 +0300 |
commit | d0ec24066b5fbb4e3accc9c45f72f7c638b35dba (patch) | |
tree | 7e6ec1a320f596b31f205caee5d5753eaa42f4ff /pkg/pubsub/interface.go | |
parent | 0323e070103cc2c30d2cdfb12719d753acafe151 (diff) |
- Websockets bug fixing and polishing
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pubsub/interface.go')
-rw-r--r-- | pkg/pubsub/interface.go | 13 |
1 files changed, 11 insertions, 2 deletions
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 |