github.com/tumi8/quic-go@v0.37.4-tum/logging/null_tracer.go (about) 1 package logging 2 3 import ( 4 "net" 5 "time" 6 ) 7 8 // The NullTracer is a Tracer that does nothing. 9 // It is useful for embedding. 10 type NullTracer struct{} 11 12 var _ Tracer = &NullTracer{} 13 14 func (n NullTracer) SentPacket(net.Addr, *Header, ByteCount, []Frame) {} 15 func (n NullTracer) SentVersionNegotiationPacket(_ net.Addr, dest, src ArbitraryLenConnectionID, _ []VersionNumber) { 16 } 17 func (n NullTracer) DroppedPacket(net.Addr, PacketType, ByteCount, PacketDropReason) {} 18 19 // The NullConnectionTracer is a ConnectionTracer that does nothing. 20 // It is useful for embedding. 21 type NullConnectionTracer struct{} 22 23 var _ ConnectionTracer = &NullConnectionTracer{} 24 25 func (n NullConnectionTracer) StartedConnection(local, remote net.Addr, srcConnID, destConnID ConnectionID) { 26 } 27 28 func (n NullConnectionTracer) NegotiatedVersion(chosen VersionNumber, clientVersions, serverVersions []VersionNumber) { 29 } 30 func (n NullConnectionTracer) ClosedConnection(err error) {} 31 func (n NullConnectionTracer) SentTransportParameters(*TransportParameters) {} 32 func (n NullConnectionTracer) ReceivedTransportParameters(*TransportParameters) {} 33 func (n NullConnectionTracer) RestoredTransportParameters(*TransportParameters) {} 34 func (n NullConnectionTracer) SentLongHeaderPacket(*ExtendedHeader, ByteCount, *AckFrame, []Frame) {} 35 func (n NullConnectionTracer) SentShortHeaderPacket(*ShortHeader, ByteCount, *AckFrame, []Frame) {} 36 func (n NullConnectionTracer) ReceivedVersionNegotiationPacket(dest, src ArbitraryLenConnectionID, _ []VersionNumber) { 37 } 38 func (n NullConnectionTracer) ReceivedRetry(*Header) {} 39 func (n NullConnectionTracer) ReceivedLongHeaderPacket(*ExtendedHeader, ByteCount, []Frame) {} 40 func (n NullConnectionTracer) ReceivedShortHeaderPacket(*ShortHeader, ByteCount, []Frame) {} 41 func (n NullConnectionTracer) BufferedPacket(PacketType, ByteCount) {} 42 func (n NullConnectionTracer) DroppedPacket(PacketType, ByteCount, PacketDropReason) {} 43 44 func (n NullConnectionTracer) UpdatedMetrics(rttStats *RTTStats, cwnd, bytesInFlight ByteCount, packetsInFlight int) { 45 } 46 func (n NullConnectionTracer) AcknowledgedPacket(EncryptionLevel, PacketNumber) {} 47 func (n NullConnectionTracer) LostPacket(EncryptionLevel, PacketNumber, PacketLossReason) {} 48 func (n NullConnectionTracer) UpdatedCongestionState(CongestionState) {} 49 func (n NullConnectionTracer) UpdatedPTOCount(uint32) {} 50 func (n NullConnectionTracer) UpdatedKeyFromTLS(EncryptionLevel, Perspective) {} 51 func (n NullConnectionTracer) UpdatedKey(keyPhase KeyPhase, remote bool) {} 52 func (n NullConnectionTracer) DroppedEncryptionLevel(EncryptionLevel) {} 53 func (n NullConnectionTracer) DroppedKey(KeyPhase) {} 54 func (n NullConnectionTracer) SetLossTimer(TimerType, EncryptionLevel, time.Time) {} 55 func (n NullConnectionTracer) LossTimerExpired(timerType TimerType, level EncryptionLevel) {} 56 func (n NullConnectionTracer) LossTimerCanceled() {} 57 func (n NullConnectionTracer) Close() {} 58 func (n NullConnectionTracer) Debug(name, msg string) {}