diff options
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 |