qlogwriter: pass the event time to Event.Encode (#5362)

This is needed for events such as recovery:loss_timer_updated, which
contain the timer expiration timestamp encoded as a difference from the
event time.
This commit is contained in:
Marten Seemann
2025-10-09 13:57:14 +08:00
committed by GitHub
parent c26e86c547
commit e0f9663be4
6 changed files with 173 additions and 225 deletions

View File

@@ -38,6 +38,18 @@ func init() {
}
}
type encoderHelper struct {
enc *jsontext.Encoder
err error
}
func (h *encoderHelper) WriteToken(t jsontext.Token) {
if h.err != nil {
return
}
h.err = h.enc.WriteToken(t)
}
type traceHeader struct {
VantagePointType string
GroupID *ConnectionID