(ctx context.Context, data wps.SubscriptionRequest)
| 520 | } |
| 521 | |
| 522 | func (ws *WshServer) EventSubCommand(ctx context.Context, data wps.SubscriptionRequest) error { |
| 523 | rpcSource := wshutil.GetRpcSourceFromContext(ctx) |
| 524 | if rpcSource == "" { |
| 525 | return fmt.Errorf("no rpc source set") |
| 526 | } |
| 527 | wps.Broker.Subscribe(rpcSource, data) |
| 528 | return nil |
| 529 | } |
| 530 | |
| 531 | func (ws *WshServer) EventUnsubCommand(ctx context.Context, data string) error { |
| 532 | rpcSource := wshutil.GetRpcSourceFromContext(ctx) |
nothing calls this directly
no test coverage detected