MCPcopy
hub / github.com/grafana/tempo / newLiveTracesIter

Function newLiveTracesIter

modules/blockbuilder/live_traces_iter.go:43–55  ·  view source on GitHub ↗
(liveTraces *livetraces.LiveTraces[[]byte])

Source from the content-addressed store, hash-verified

41}
42
43func 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
57func (i *liveTracesIter) Next(ctx context.Context) (common.ID, *tempopb.Trace, error) {
58 if len(i.chBuf) == 0 {

Calls 1

iterMethod · 0.95