diff options
author | Valery Piashchynski <[email protected]> | 2021-06-20 16:40:14 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-20 16:40:14 +0300 |
commit | 2dd30155de6faaf6005027d5337a840310c827f9 (patch) | |
tree | aa6f0ce2d2db2047b7e729b16dd70d721f4bae55 /pkg/pubsub/interface.go | |
parent | 25dfc0d837827d0d1c729d323dd651ca6163fe09 (diff) |
- Update redis/memory pubsubs
- Rework internal message bus
- Add new tests for the broadcast plugin and include them into the GA
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/pubsub/interface.go')
-rw-r--r-- | pkg/pubsub/interface.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/pubsub/interface.go b/pkg/pubsub/interface.go index 53f92cb8..06252d70 100644 --- a/pkg/pubsub/interface.go +++ b/pkg/pubsub/interface.go @@ -1,7 +1,5 @@ package pubsub -import websocketsv1beta "github.com/spiral/roadrunner/v2/proto/websockets/v1beta" - /* This interface is in BETA. It might be changed. */ @@ -38,18 +36,19 @@ type Subscriber interface { // BETA interface type Publisher interface { // Publish one or multiple Channel. - Publish(messages []byte) error + Publish(message *Message) error // PublishAsync publish message and return immediately // If error occurred it will be printed into the logger - PublishAsync(messages []byte) + PublishAsync(message *Message) } // Reader interface should return next message type Reader interface { - Next() (*websocketsv1beta.Message, error) + Next() (*Message, error) } +// Constructor is a special pub-sub interface made to return a constructed PubSub type type Constructor interface { PSConstruct(key string) (PubSub, error) } |