Function
NewTraceInfoWithMaxLongWrites
(timestamp time.Time, maxLongWrites int64, tempoOrgID string)
Source from the content-addressed store, hash-verified
| 72 | } |
| 73 | |
| 74 | func NewTraceInfoWithMaxLongWrites(timestamp time.Time, maxLongWrites int64, tempoOrgID string) *TraceInfo { |
| 75 | r := newRand(timestamp) |
| 76 | |
| 77 | return &TraceInfo{ |
| 78 | timestamp: timestamp, |
| 79 | r: r, |
| 80 | traceIDHigh: r.Int63(), |
| 81 | traceIDLow: r.Int63(), |
| 82 | longWritesRemaining: maxLongWrites, |
| 83 | tempoOrgID: tempoOrgID, |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | func (t *TraceInfo) Ready(now time.Time, writeBackoff, longWriteBackoff time.Duration) bool { |
| 88 | // Don't use the last time interval to allow the write loop to finish before |