-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The NullConnectionTracer can be embedded, to make it easier to access just a few of the calls.
- Loading branch information
1 parent
8c0c481
commit ddcb394
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package logging | ||
|
||
import ( | ||
"net" | ||
"time" | ||
) | ||
|
||
var NullConnectionTracer ConnectionTracer = &nullConnectionTracer{} | ||
|
||
type nullConnectionTracer struct{} | ||
|
||
var _ ConnectionTracer = &nullConnectionTracer{} | ||
|
||
func (n nullConnectionTracer) StartedConnection(local, remote net.Addr, srcConnID, destConnID ConnectionID) { | ||
} | ||
|
||
func (n nullConnectionTracer) NegotiatedVersion(chosen VersionNumber, clientVersions, serverVersions []VersionNumber) { | ||
} | ||
func (n nullConnectionTracer) ClosedConnection(err error) {} | ||
func (n nullConnectionTracer) SentTransportParameters(*TransportParameters) {} | ||
func (n nullConnectionTracer) ReceivedTransportParameters(*TransportParameters) {} | ||
func (n nullConnectionTracer) RestoredTransportParameters(*TransportParameters) {} | ||
func (n nullConnectionTracer) SentPacket(*ExtendedHeader, ByteCount, *AckFrame, []Frame) {} | ||
func (n nullConnectionTracer) ReceivedVersionNegotiationPacket(*Header, []VersionNumber) {} | ||
func (n nullConnectionTracer) ReceivedRetry(*Header) {} | ||
func (n nullConnectionTracer) ReceivedPacket(hdr *ExtendedHeader, size ByteCount, frames []Frame) {} | ||
func (n nullConnectionTracer) BufferedPacket(PacketType) {} | ||
func (n nullConnectionTracer) DroppedPacket(PacketType, ByteCount, PacketDropReason) {} | ||
func (n nullConnectionTracer) UpdatedMetrics(rttStats *RTTStats, cwnd, bytesInFlight ByteCount, packetsInFlight int) { | ||
} | ||
func (n nullConnectionTracer) AcknowledgedPacket(EncryptionLevel, PacketNumber) {} | ||
func (n nullConnectionTracer) LostPacket(EncryptionLevel, PacketNumber, PacketLossReason) {} | ||
func (n nullConnectionTracer) UpdatedCongestionState(CongestionState) {} | ||
func (n nullConnectionTracer) UpdatedPTOCount(uint32) {} | ||
func (n nullConnectionTracer) UpdatedKeyFromTLS(EncryptionLevel, Perspective) {} | ||
func (n nullConnectionTracer) UpdatedKey(keyPhase KeyPhase, remote bool) {} | ||
func (n nullConnectionTracer) DroppedEncryptionLevel(EncryptionLevel) {} | ||
func (n nullConnectionTracer) DroppedKey(KeyPhase) {} | ||
func (n nullConnectionTracer) SetLossTimer(TimerType, EncryptionLevel, time.Time) {} | ||
func (n nullConnectionTracer) LossTimerExpired(timerType TimerType, level EncryptionLevel) {} | ||
func (n nullConnectionTracer) LossTimerCanceled() {} | ||
func (n nullConnectionTracer) Close() {} | ||
func (n nullConnectionTracer) Debug(name, msg string) {} |