diff options
Diffstat (limited to 'plugins/broadcast/root/rpc.go')
-rw-r--r-- | plugins/broadcast/root/rpc.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/plugins/broadcast/root/rpc.go b/plugins/broadcast/root/rpc.go deleted file mode 100644 index 5604a574..00000000 --- a/plugins/broadcast/root/rpc.go +++ /dev/null @@ -1,25 +0,0 @@ -package broadcast - -import "golang.org/x/sync/errgroup" - -type rpcService struct { - svc *Service -} - -// Publish Messages. -func (r *rpcService) Publish(msg []*Message, ok *bool) error { - *ok = true - return r.svc.Publish(msg...) -} - -// Publish Messages in async mode. Blocks until get an err or nil from publish -func (r *rpcService) PublishAsync(msg []*Message, ok *bool) error { - *ok = true - g := &errgroup.Group{} - - g.Go(func() error { - return r.svc.Publish(msg...) - }) - - return g.Wait() -} |