(channel string, batch sbuf.Batch)
| 54 | } |
| 55 | |
| 56 | func (w *Writer) WriteBatch(channel string, batch sbuf.Batch) error { |
| 57 | if w.channel != channel { |
| 58 | w.channel = channel |
| 59 | if err := w.WriteControl(api.QueryChannelSet{Channel: channel}); err != nil { |
| 60 | return err |
| 61 | } |
| 62 | } |
| 63 | defer batch.Unref() |
| 64 | return w.writer.Push(sbuf.Dematerialize(w.sctx, batch)) |
| 65 | } |
| 66 | |
| 67 | func (w *Writer) WhiteChannelEnd(channel string) error { |
| 68 | return w.WriteControl(api.QueryChannelEnd{Channel: channel}) |
no test coverage detected