diff options
author | Valery Piashchynski <[email protected]> | 2021-06-05 21:51:50 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-05 21:51:50 +0300 |
commit | 459e29a85fe5c8571920a602ceb8374bbb893f49 (patch) | |
tree | 83f9c35ff54945bd8173d0e7201234d17341007c /pkg/pubsub/interface.go | |
parent | 0323e070103cc2c30d2cdfb12719d753acafe151 (diff) | |
parent | 7995c44d47075cca01c44120e5617d1d90b2a039 (diff) |
#705 feat(websockets): bug fixing and polishing
#705 feat(websockets): bug fixing and polishing
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 |