(liveTraces *livetraces.LiveTraces[[]byte])
| 41 | } |
| 42 | |
| 43 | func newLiveTracesIter(liveTraces *livetraces.LiveTraces[[]byte]) *liveTracesIter { |
| 44 | ctx, cancel := context.WithCancel(context.Background()) |
| 45 | |
| 46 | l := &liveTracesIter{ |
| 47 | liveTraces: liveTraces, |
| 48 | ch: make(chan []chEntry, 1), |
| 49 | cancel: cancel, |
| 50 | } |
| 51 | |
| 52 | go l.iter(ctx) |
| 53 | |
| 54 | return l |
| 55 | } |
| 56 | |
| 57 | func (i *liveTracesIter) Next(ctx context.Context) (common.ID, *tempopb.Trace, error) { |
| 58 | if len(i.chBuf) == 0 { |