(ctx context.Context, payload []byte)
| 160 | } |
| 161 | |
| 162 | func (s *EventStream) SendRaw(ctx context.Context, payload []byte) error { |
| 163 | select { |
| 164 | case <-ctx.Done(): |
| 165 | return ctx.Err() |
| 166 | case <-s.ctx.Done(): |
| 167 | return s.ctx.Err() |
| 168 | case <-s.doneCh: |
| 169 | return ErrEventStreamClosed |
| 170 | case s.eventsCh <- payload: |
| 171 | return nil |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // Shutdown gracefully shuts down the stream, sending any supplementary events downstream if required. |
| 176 | // ONLY call this once all events have been submitted. |
no outgoing calls
no test coverage detected