summaryrefslogtreecommitdiff
path: root/plugins/websockets
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-09 20:00:23 +0300
committerValery Piashchynski <[email protected]>2021-06-09 20:00:23 +0300
commitec9b71c5468d8a6f1b999a35dca6e78af55b9895 (patch)
treea4201534f29c47cb1059627888b675b4f9660589 /plugins/websockets
parent8fdf05d4f360a9f6344141b273eab9d6859470e0 (diff)
- Switch to the new goridge v3.1 which supports PROTOBUF
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/websockets')
-rw-r--r--plugins/websockets/rpc.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/websockets/rpc.go b/plugins/websockets/rpc.go
index 00c1dd91..80697fa2 100644
--- a/plugins/websockets/rpc.go
+++ b/plugins/websockets/rpc.go
@@ -15,12 +15,12 @@ type rpc struct {
// Publish ... msg is a proto decoded payload
// see: pkg/pubsub/message.fbs
-func (r *rpc) Publish(in *websocketsv1.Messages, ok *bool) error {
+func (r *rpc) Publish(in *websocketsv1.Request, out *websocketsv1.Response) error {
const op = errors.Op("broadcast_publish")
// just return in case of nil message
if in == nil {
- *ok = true
+ out.Ok = false
return nil
}
@@ -36,23 +36,23 @@ func (r *rpc) Publish(in *websocketsv1.Messages, ok *bool) error {
err = r.plugin.Publish(bb)
if err != nil {
- *ok = false
+ out.Ok = false
return errors.E(op, err)
}
}
- *ok = true
+ out.Ok = false
return nil
}
// PublishAsync ...
// see: pkg/pubsub/message.fbs
-func (r *rpc) PublishAsync(in *websocketsv1.Messages, ok *bool) error {
+func (r *rpc) PublishAsync(in *websocketsv1.Request, out *websocketsv1.Response) error {
const op = errors.Op("publish_async")
// just return in case of nil message
if in == nil {
- *ok = true
+ out.Ok = false
return nil
}
@@ -69,6 +69,6 @@ func (r *rpc) PublishAsync(in *websocketsv1.Messages, ok *bool) error {
r.plugin.PublishAsync(bb)
}
- *ok = true
+ out.Ok = false
return nil
}