diff options
author | Valery Piashchynski <[email protected]> | 2021-06-02 19:16:36 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-02 19:16:36 +0300 |
commit | a99c14abb333c10a9142cd2f178e001f1b1726fb (patch) | |
tree | ec46ffb3db177f9aacef75d9c7bdcd6d894bf20c /pkg/pubsub/interface.go | |
parent | 548ee4432e48b316ada00feec1a6b89e67ae4f2f (diff) | |
parent | 27295b35e4f2702bf73d8ab10d10b84e527daf2b (diff) |
#698 feat(ws): replace `json` with binary flatbuffers
#698 feat(ws): replace `json` with binary flatbuffers
Diffstat (limited to 'pkg/pubsub/interface.go')
-rw-r--r-- | pkg/pubsub/interface.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/pubsub/interface.go b/pkg/pubsub/interface.go index caf8783f..18c1a80c 100644 --- a/pkg/pubsub/interface.go +++ b/pkg/pubsub/interface.go @@ -1,5 +1,7 @@ package pubsub +import "github.com/spiral/roadrunner/v2/pkg/pubsub/message" + // PubSub ... type PubSub interface { Publisher @@ -19,14 +21,14 @@ type Subscriber interface { // Publisher publish one or more messages type Publisher interface { // Publish one or multiple Channel. - Publish(messages []*Message) error + Publish(messages []byte) error // PublishAsync publish message and return immediately // If error occurred it will be printed into the logger - PublishAsync(messages []*Message) + PublishAsync(messages []byte) } // Reader interface should return next message type Reader interface { - Next() (*Message, error) + Next() (*message.Message, error) } |