blob: 948fd7ae26155b4bcc885683a8dc9a705324732a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package broadcast
import (
"github.com/spiral/errors"
"github.com/spiral/roadrunner/v2/plugins/logger"
)
type rpc struct {
log logger.Logger
svc *Plugin
}
func (r *rpc) Publish(msg []*Message, ok *bool) error {
const op = errors.Op("broadcast_publish")
err := r.svc.Publish(msg)
if err != nil {
*ok = false
return errors.E(op, err)
}
*ok = true
return nil
}
func (r *rpc) PublishAsync() {
}
|