implement qlogging of the congestion_state_updated event

This commit is contained in:
Marten Seemann
2020-07-22 15:19:45 +07:00
parent 0b7efe10d1
commit 5cf72e2f34
5 changed files with 51 additions and 1 deletions

View File

@@ -308,3 +308,20 @@ func (r timeoutReason) String() string {
panic("unknown close reason")
}
}
type congestionState logging.CongestionState
func (s congestionState) String() string {
switch logging.CongestionState(s) {
case logging.CongestionStateSlowStart:
return "slow_start"
case logging.CongestionStateCongestionAvoidance:
return "congestion_avoidance"
case logging.CongestionStateRecovery:
return "recovery"
case logging.CongestionStateApplicationLimited:
return "application_limited"
default:
panic("unknown congestion state")
}
}