summaryrefslogtreecommitdiff
path: root/plugins/broadcast/rpc.go
blob: 92a2f36858cf69298cf568d2c992b23a1787ac2d (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
27
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() {

}