introduce a ConnectionTracingID type for the ConnectionTracingKey (#4400)

This is a breaking API change. Unfortunately, context values are not
strongly typed, so users will have have to take to change their type
assertions.
This commit is contained in:
Marten Seemann
2024-04-02 17:10:12 +13:00
committed by GitHub
parent f389b638d2
commit 27a06f32ce
6 changed files with 28 additions and 25 deletions

View File

@@ -59,6 +59,9 @@ var Err0RTTRejected = errors.New("0-RTT rejected")
// as well as on the context passed to logging.Tracer.NewConnectionTracer.
var ConnectionTracingKey = connTracingCtxKey{}
// ConnectionTracingID is the type of the context value saved under the ConnectionTracingKey.
type ConnectionTracingID uint64
type connTracingCtxKey struct{}
// QUICVersionContextKey can be used to find out the QUIC version of a TLS handshake from the