(ctx context.Context, data wps.WaveEvent)
| 508 | } |
| 509 | |
| 510 | func (ws *WshServer) EventPublishCommand(ctx context.Context, data wps.WaveEvent) error { |
| 511 | rpcSource := wshutil.GetRpcSourceFromContext(ctx) |
| 512 | if rpcSource == "" { |
| 513 | return fmt.Errorf("no rpc source set") |
| 514 | } |
| 515 | if data.Sender == "" { |
| 516 | data.Sender = rpcSource |
| 517 | } |
| 518 | wps.Broker.Publish(data) |
| 519 | return nil |
| 520 | } |
| 521 | |
| 522 | func (ws *WshServer) EventSubCommand(ctx context.Context, data wps.SubscriptionRequest) error { |
| 523 | rpcSource := wshutil.GetRpcSourceFromContext(ctx) |
nothing calls this directly
no test coverage detected