Documentation
¶
Index ¶
- Constants
- func DefaultConnectionTracer(_ context.Context, isClient bool, connID ConnectionID) qlogwriter.Trace
- func DefaultConnectionTracerWithSchemas(_ context.Context, isClient bool, connID ConnectionID, eventSchemas []string) qlogwriter.Trace
- type ALPNInformation
- type AckFrame
- type AckFrequencyFrame
- type AckRange
- type ApplicationErrorCode
- type ArbitraryLenConnectionID
- type CongestionState
- type CongestionStateUpdated
- type ConnectionCloseFrame
- type ConnectionCloseTrigger
- type ConnectionClosed
- type ConnectionID
- type CryptoFrame
- type DataBlockedFrame
- type DatagramFrame
- type DatagramID
- type DebugEvent
- type ECN
- type ECNState
- type ECNStateUpdated
- type EncryptionLevel
- type Frame
- type HandshakeDoneFrame
- type ImmediateAckFrame
- type Initiator
- type KeyDiscarded
- type KeyPhase
- type KeyPhaseBit
- type KeyType
- type KeyUpdateTrigger
- type KeyUpdated
- type LossTimerUpdateType
- type LossTimerUpdated
- type MTUUpdated
- type MaxDataFrame
- type MaxStreamDataFrame
- type MaxStreamsFrame
- type MetricsUpdated
- type NewConnectionIDFrame
- type NewTokenFrame
- type PTOCountUpdated
- type PacketBuffered
- type PacketDropReason
- type PacketDropped
- type PacketHeader
- type PacketHeaderVersionNegotiation
- type PacketLossReason
- type PacketLost
- type PacketNumber
- type PacketReceived
- type PacketSent
- type PacketType
- type ParametersSet
- type PathChallengeFrame
- type PathEndpointInfo
- type PathResponseFrame
- type PingFrame
- type PreferredAddress
- type RawInfo
- type ResetStreamFrame
- type RetireConnectionIDFrame
- type SpuriousLoss
- type StartedConnection
- type StopSendingFrame
- type StreamDataBlockedFrame
- type StreamFrame
- type StreamID
- type StreamsBlockedFrame
- type TimerType
- type Token
- type TransportErrorCode
- type Version
- type VersionInformation
- type VersionNegotiationReceived
- type VersionNegotiationSent
Constants ¶
const ( // KeyPhaseZero is key phase bit 0 KeyPhaseZero = protocol.KeyPhaseZero // KeyPhaseOne is key phase bit 1 KeyPhaseOne = protocol.KeyPhaseOne )
const EventSchema = "urn:ietf:params:qlog:events:quic-12"
EventSchema is the qlog event schema for QUIC
Variables ¶
This section is empty.
Functions ¶
func DefaultConnectionTracer ¶
func DefaultConnectionTracer(_ context.Context, isClient bool, connID ConnectionID) qlogwriter.Trace
DefaultConnectionTracer creates a qlog file in the qlog directory specified by the QLOGDIR environment variable. File names are <odcid>_<perspective>.sqlog. Returns nil if QLOGDIR is not set.
func DefaultConnectionTracerWithSchemas ¶
func DefaultConnectionTracerWithSchemas(_ context.Context, isClient bool, connID ConnectionID, eventSchemas []string) qlogwriter.Trace
Types ¶
type ALPNInformation ¶
type ALPNInformation struct {
ChosenALPN string
}
func (ALPNInformation) Name ¶
func (e ALPNInformation) Name() string
type AckFrequencyFrame ¶
type AckFrequencyFrame = wire.AckFrequencyFrame
An AckFrequencyFrame is an ACK_FREQUENCY frame.
type ApplicationErrorCode ¶
type ApplicationErrorCode = qerr.ApplicationErrorCode
type ArbitraryLenConnectionID ¶
type ArbitraryLenConnectionID = protocol.ArbitraryLenConnectionID
type CongestionState ¶
type CongestionState string
const ( // CongestionStateSlowStart is the slow start phase of Reno / Cubic CongestionStateSlowStart CongestionState = "slow_start" // CongestionStateCongestionAvoidance is the congestion avoidance phase of Reno / Cubic CongestionStateCongestionAvoidance CongestionState = "congestion_avoidance" // CongestionStateRecovery is the recovery phase of Reno / Cubic CongestionStateRecovery CongestionState = "recovery" // CongestionStateApplicationLimited means that the congestion controller is application limited CongestionStateApplicationLimited CongestionState = "application_limited" )
func (CongestionState) String ¶
func (s CongestionState) String() string
type CongestionStateUpdated ¶
type CongestionStateUpdated struct {
State CongestionState
}
func (CongestionStateUpdated) Name ¶
func (e CongestionStateUpdated) Name() string
type ConnectionCloseFrame ¶
type ConnectionCloseFrame = wire.ConnectionCloseFrame
A ConnectionCloseFrame is a CONNECTION_CLOSE frame.
type ConnectionCloseTrigger ¶
type ConnectionCloseTrigger string
const ( // IdleTimeout indicates the connection was closed due to idle timeout ConnectionCloseTriggerIdleTimeout ConnectionCloseTrigger = "idle_timeout" // Application indicates the connection was closed by the application ConnectionCloseTriggerApplication ConnectionCloseTrigger = "application" // VersionMismatch indicates the connection was closed due to a QUIC version mismatch ConnectionCloseTriggerVersionMismatch ConnectionCloseTrigger = "version_mismatch" // StatelessReset indicates the connection was closed due to receiving a stateless reset from the peer ConnectionCloseTriggerStatelessReset ConnectionCloseTrigger = "stateless_reset" )
type ConnectionClosed ¶
type ConnectionClosed struct {
Initiator Initiator
ConnectionError *TransportErrorCode
ApplicationError *ApplicationErrorCode
Reason string
Trigger ConnectionCloseTrigger
}
func (ConnectionClosed) Name ¶
func (e ConnectionClosed) Name() string
type ConnectionID ¶
type ConnectionID = protocol.ConnectionID
type CryptoFrame ¶
A CryptoFrame is a CRYPTO frame.
type DataBlockedFrame ¶
type DataBlockedFrame = wire.DataBlockedFrame
A DataBlockedFrame is a DATA_BLOCKED frame.
type DatagramFrame ¶
type DatagramFrame struct {
Length int64
}
A DatagramFrame is a DATAGRAM frame.
type DatagramID ¶
type DatagramID uint32
DatagramID is a unique identifier for a datagram
func CalculateDatagramID ¶
func CalculateDatagramID(packet []byte) DatagramID
CalculateDatagramID computes a DatagramID for a given packet
type DebugEvent ¶
DebugEvent is a generic event that can be used to log arbitrary messages.
func (DebugEvent) Name ¶
func (e DebugEvent) Name() string
type ECNState ¶
type ECNState string
ECNState is the state of the ECN state machine (see Appendix A.4 of RFC 9000)
const ( // ECNStateTesting is the testing state ECNStateTesting ECNState = "testing" // ECNStateUnknown is the unknown state ECNStateUnknown ECNState = "unknown" // ECNStateFailed is the failed state ECNStateFailed ECNState = "failed" // ECNStateCapable is the capable state ECNStateCapable ECNState = "capable" )
type ECNStateUpdated ¶
func (ECNStateUpdated) Name ¶
func (e ECNStateUpdated) Name() string
type EncryptionLevel ¶
type EncryptionLevel = protocol.EncryptionLevel
type HandshakeDoneFrame ¶
type HandshakeDoneFrame = wire.HandshakeDoneFrame
A HandshakeDoneFrame is a HANDSHAKE_DONE frame.
type ImmediateAckFrame ¶
type ImmediateAckFrame = wire.ImmediateAckFrame
An ImmediateAckFrame is an IMMEDIATE_ACK frame.
type KeyDiscarded ¶
func (KeyDiscarded) Name ¶
func (e KeyDiscarded) Name() string
type KeyPhaseBit ¶
type KeyPhaseBit = protocol.KeyPhaseBit
type KeyType ¶
type KeyType string
KeyType represents the type of cryptographic key used in QUIC connections.
const ( // KeyTypeServerInitial represents the server's initial secret key. KeyTypeServerInitial KeyType = "server_initial_secret" // KeyTypeClientInitial represents the client's initial secret key. KeyTypeClientInitial KeyType = "client_initial_secret" // KeyTypeServerHandshake represents the server's handshake secret key. KeyTypeServerHandshake KeyType = "server_handshake_secret" // KeyTypeClientHandshake represents the client's handshake secret key. KeyTypeClientHandshake KeyType = "client_handshake_secret" // KeyTypeServer0RTT represents the server's 0-RTT secret key. KeyTypeServer0RTT KeyType = "server_0rtt_secret" // KeyTypeClient0RTT represents the client's 0-RTT secret key. KeyTypeClient0RTT KeyType = "client_0rtt_secret" // KeyTypeServer1RTT represents the server's 1-RTT secret key. KeyTypeServer1RTT KeyType = "server_1rtt_secret" // KeyTypeClient1RTT represents the client's 1-RTT secret key. KeyTypeClient1RTT KeyType = "client_1rtt_secret" )
type KeyUpdateTrigger ¶
type KeyUpdateTrigger string
KeyUpdateTrigger describes what caused a key update event.
const ( // KeyUpdateTLS indicates the key update was triggered by TLS. KeyUpdateTLS KeyUpdateTrigger = "tls" // KeyUpdateRemote indicates the key update was triggered by the remote peer. KeyUpdateRemote KeyUpdateTrigger = "remote_update" // KeyUpdateLocal indicates the key update was triggered locally. KeyUpdateLocal KeyUpdateTrigger = "local_update" )
type KeyUpdated ¶
type KeyUpdated struct {
Trigger KeyUpdateTrigger
KeyType KeyType
KeyPhase KeyPhase // only set for 1-RTT keys
}
func (KeyUpdated) Name ¶
func (e KeyUpdated) Name() string
type LossTimerUpdateType ¶
type LossTimerUpdateType string
const ( LossTimerUpdateTypeSet LossTimerUpdateType = "set" LossTimerUpdateTypeExpired LossTimerUpdateType = "expired" LossTimerUpdateTypeCancelled LossTimerUpdateType = "cancelled" )
type LossTimerUpdated ¶
type LossTimerUpdated struct {
Type LossTimerUpdateType
TimerType TimerType
EncLevel EncryptionLevel
Time time.Time
}
func (LossTimerUpdated) Name ¶
func (e LossTimerUpdated) Name() string
type MTUUpdated ¶
func (MTUUpdated) Name ¶
func (e MTUUpdated) Name() string
type MaxStreamDataFrame ¶
type MaxStreamDataFrame = wire.MaxStreamDataFrame
A MaxStreamDataFrame is a MAX_STREAM_DATA frame.
type MaxStreamsFrame ¶
type MaxStreamsFrame = wire.MaxStreamsFrame
A MaxStreamsFrame is a MAX_STREAMS_FRAME.
type MetricsUpdated ¶
type MetricsUpdated struct {
MinRTT time.Duration
SmoothedRTT time.Duration
LatestRTT time.Duration
RTTVariance time.Duration
CongestionWindow int
BytesInFlight int
PacketsInFlight int
}
MetricsUpdated logs RTT and congestion metrics as defined in the recovery:metrics_updated event. The PTO count is logged via PTOCountUpdated.
func (MetricsUpdated) Name ¶
func (e MetricsUpdated) Name() string
type NewConnectionIDFrame ¶
type NewConnectionIDFrame = wire.NewConnectionIDFrame
A NewConnectionIDFrame is a NEW_CONNECTION_ID frame.
type PTOCountUpdated ¶
type PTOCountUpdated struct {
PTOCount uint32
}
PTOCountUpdated logs the pto_count value of the recovery:metrics_updated event.
func (PTOCountUpdated) Name ¶
func (e PTOCountUpdated) Name() string
type PacketBuffered ¶
type PacketBuffered struct {
Header PacketHeader
Raw RawInfo
DatagramID DatagramID
}
func (PacketBuffered) Name ¶
func (e PacketBuffered) Name() string
type PacketDropReason ¶
type PacketDropReason string
const ( PacketDropKeyUnavailable PacketDropReason = "key_unavailable" // PacketDropUnknownConnectionID is used when a packet is dropped because the connection ID is unknown PacketDropUnknownConnectionID PacketDropReason = "unknown_connection_id" // PacketDropHeaderParseError is used when a packet is dropped because header parsing failed PacketDropHeaderParseError PacketDropReason = "header_parse_error" // PacketDropPayloadDecryptError is used when a packet is dropped because decrypting the payload failed PacketDropPayloadDecryptError PacketDropReason = "payload_decrypt_error" // PacketDropProtocolViolation is used when a packet is dropped due to a protocol violation PacketDropProtocolViolation PacketDropReason = "protocol_violation" // PacketDropDOSPrevention is used when a packet is dropped to mitigate a DoS attack PacketDropDOSPrevention PacketDropReason = "dos_prevention" // PacketDropUnsupportedVersion is used when a packet is dropped because the version is not supported PacketDropUnsupportedVersion PacketDropReason = "unsupported_version" // PacketDropUnexpectedPacket is used when an unexpected packet is received PacketDropUnexpectedPacket PacketDropReason = "unexpected_packet" // PacketDropUnexpectedSourceConnectionID is used when a packet with an unexpected source connection ID is received PacketDropUnexpectedSourceConnectionID PacketDropReason = "unexpected_source_connection_id" // PacketDropUnexpectedVersion is used when a packet with an unexpected version is received PacketDropUnexpectedVersion PacketDropReason = "unexpected_version" // PacketDropDuplicate is used when a duplicate packet is received PacketDropDuplicate PacketDropReason = "duplicate" )
type PacketDropped ¶
type PacketDropped struct {
Header PacketHeader
Raw RawInfo
DatagramID DatagramID
Trigger PacketDropReason
}
PacketDropped is the transport:packet_dropped event.
func (PacketDropped) Name ¶
func (e PacketDropped) Name() string
type PacketHeader ¶
type PacketHeader struct {
PacketType PacketType
KeyPhaseBit KeyPhaseBit
PacketNumber PacketNumber
Version Version
SrcConnectionID ConnectionID
DestConnectionID ConnectionID
Token *Token
}
PacketHeader is a QUIC packet header.
type PacketHeaderVersionNegotiation ¶
type PacketHeaderVersionNegotiation struct {
SrcConnectionID ArbitraryLenConnectionID
DestConnectionID ArbitraryLenConnectionID
}
type PacketLossReason ¶
type PacketLossReason string
const ( // PacketLossReorderingThreshold is used when a packet is declared lost due to reordering threshold PacketLossReorderingThreshold PacketLossReason = "reordering_threshold" // PacketLossTimeThreshold is used when a packet is declared lost due to time threshold PacketLossTimeThreshold PacketLossReason = "time_threshold" )
type PacketLost ¶
type PacketLost struct {
Header PacketHeader
Trigger PacketLossReason
}
func (PacketLost) Name ¶
func (e PacketLost) Name() string
type PacketNumber ¶
type PacketNumber = protocol.PacketNumber
type PacketReceived ¶
type PacketReceived struct {
Header PacketHeader
Raw RawInfo
DatagramID DatagramID
Frames []Frame
ECN ECN
IsCoalesced bool
Trigger string
}
func (PacketReceived) Name ¶
func (e PacketReceived) Name() string
type PacketSent ¶
type PacketSent struct {
Header PacketHeader
Raw RawInfo
DatagramID DatagramID
Frames []Frame
ECN ECN
IsCoalesced bool
Trigger string
SupportedVersions []Version
}
func (PacketSent) Name ¶
func (e PacketSent) Name() string
type PacketType ¶
type PacketType string
const ( // PacketTypeInitial represents an Initial packet PacketTypeInitial PacketType = "initial" // PacketTypeHandshake represents a Handshake packet PacketTypeHandshake PacketType = "handshake" // PacketTypeRetry represents a Retry packet PacketTypeRetry PacketType = "retry" // PacketType0RTT represents a 0-RTT packet PacketType0RTT PacketType = "0RTT" // PacketTypeVersionNegotiation represents a Version Negotiation packet PacketTypeVersionNegotiation PacketType = "version_negotiation" // PacketTypeStatelessReset represents a Stateless Reset packet PacketTypeStatelessReset PacketType = "stateless_reset" // PacketType1RTT represents a 1-RTT packet PacketType1RTT PacketType = "1RTT" )
func EncryptionLevelToPacketType ¶
func EncryptionLevelToPacketType(l EncryptionLevel) PacketType
type ParametersSet ¶
type ParametersSet struct {
Restore bool
Initiator Initiator
SentBy protocol.Perspective
OriginalDestinationConnectionID protocol.ConnectionID
InitialSourceConnectionID protocol.ConnectionID
RetrySourceConnectionID *protocol.ConnectionID
StatelessResetToken *protocol.StatelessResetToken
DisableActiveMigration bool
MaxIdleTimeout time.Duration
MaxUDPPayloadSize protocol.ByteCount
AckDelayExponent uint8
MaxAckDelay time.Duration
ActiveConnectionIDLimit uint64
InitialMaxData protocol.ByteCount
InitialMaxStreamDataBidiLocal protocol.ByteCount
InitialMaxStreamDataBidiRemote protocol.ByteCount
InitialMaxStreamDataUni protocol.ByteCount
InitialMaxStreamsBidi int64
InitialMaxStreamsUni int64
PreferredAddress *PreferredAddress
MaxDatagramFrameSize protocol.ByteCount
EnableResetStreamAt bool
}
func (ParametersSet) Name ¶
func (e ParametersSet) Name() string
type PathChallengeFrame ¶
type PathChallengeFrame = wire.PathChallengeFrame
A PathChallengeFrame is a PATH_CHALLENGE frame.
type PathResponseFrame ¶
type PathResponseFrame = wire.PathResponseFrame
A PathResponseFrame is a PATH_RESPONSE frame.
type PreferredAddress ¶
type PreferredAddress struct {
IPv4, IPv6 netip.AddrPort
ConnectionID protocol.ConnectionID
StatelessResetToken protocol.StatelessResetToken
}
type ResetStreamFrame ¶
type ResetStreamFrame = wire.ResetStreamFrame
A ResetStreamFrame is a RESET_STREAM frame.
type RetireConnectionIDFrame ¶
type RetireConnectionIDFrame = wire.RetireConnectionIDFrame
A RetireConnectionIDFrame is a RETIRE_CONNECTION_ID frame.
type SpuriousLoss ¶
type SpuriousLoss struct {
EncryptionLevel protocol.EncryptionLevel
PacketNumber protocol.PacketNumber
PacketReordering uint64
TimeReordering time.Duration
}
func (SpuriousLoss) Name ¶
func (e SpuriousLoss) Name() string
type StartedConnection ¶
type StartedConnection struct {
Local PathEndpointInfo
Remote PathEndpointInfo
}
func (StartedConnection) Name ¶
func (e StartedConnection) Name() string
type StopSendingFrame ¶
type StopSendingFrame = wire.StopSendingFrame
A StopSendingFrame is a STOP_SENDING frame.
type StreamDataBlockedFrame ¶
type StreamDataBlockedFrame = wire.StreamDataBlockedFrame
A StreamDataBlockedFrame is a STREAM_DATA_BLOCKED frame.
type StreamFrame ¶
A StreamFrame is a STREAM frame.
type StreamsBlockedFrame ¶
type StreamsBlockedFrame = wire.StreamsBlockedFrame
A StreamsBlockedFrame is a STREAMS_BLOCKED frame.
type TransportErrorCode ¶
type TransportErrorCode = qerr.TransportErrorCode
type VersionInformation ¶
func (VersionInformation) Name ¶
func (e VersionInformation) Name() string
type VersionNegotiationReceived ¶
type VersionNegotiationReceived struct {
Header PacketHeaderVersionNegotiation
SupportedVersions []Version
}
func (VersionNegotiationReceived) Name ¶
func (e VersionNegotiationReceived) Name() string
type VersionNegotiationSent ¶
type VersionNegotiationSent struct {
Header PacketHeaderVersionNegotiation
SupportedVersions []Version
}
func (VersionNegotiationSent) Name ¶
func (e VersionNegotiationSent) Name() string