summaryrefslogtreecommitdiff
path: root/plugins/broadcast/websockets/rpc.go
blob: 1c62b902caf8a51880dbf3888845bf199e6d21e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package websockets

type rpcService struct {
	svc *Service
}

// Subscribe subscribes broadcast client to the given topic ahead of any websocket connections.
func (r *rpcService) Subscribe(topic string, ok *bool) error {
	*ok = true
	return r.svc.client.Subscribe(topic)
}

// SubscribePattern subscribes broadcast client to
func (r *rpcService) SubscribePattern(pattern string, ok *bool) error {
	*ok = true
	return r.svc.client.SubscribePattern(pattern)
}