-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
null_tracer.go
53 lines (46 loc) · 3.07 KB
/
null_tracer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package logging
import (
"context"
"net"
"time"
)
var (
NullTracer Tracer = &nullTracer{}
NullConnectionTracer ConnectionTracer = &nullConnectionTracer{}
)
type nullTracer struct{}
func (n nullTracer) TracerForConnection(context.Context, Perspective, ConnectionID) ConnectionTracer {
return NullConnectionTracer
}
func (n nullTracer) SentPacket(net.Addr, *Header, ByteCount, []Frame) {}
func (n nullTracer) DroppedPacket(net.Addr, PacketType, ByteCount, PacketDropReason) {}
type nullConnectionTracer struct{}
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) {}