qlog: add support for alpn_information event (#4216)

* qlog chosen alpn

* qlog chosen alpn

* qlog: fix capitalization of ALPN

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
Benedikt Spies 2023-12-26 06:02:47 +01:00 committed by GitHub
parent 2243fdefbf
commit 31a677cacd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 79 additions and 0 deletions

View file

@ -98,6 +98,9 @@ func NewMockConnectionTracer(ctrl *gomock.Controller) (*logging.ConnectionTracer
ECNStateUpdated: func(state logging.ECNState, trigger logging.ECNStateTrigger) {
t.ECNStateUpdated(state, trigger)
},
ChoseALPN: func(protocol string) {
t.ChoseALPN(protocol)
},
Close: func() {
t.Close()
},

View file

@ -115,6 +115,42 @@ func (c *ConnectionTracerBufferedPacketCall) DoAndReturn(f func(logging.PacketTy
return c
}
// ChoseALPN mocks base method.
func (m *MockConnectionTracer) ChoseALPN(arg0 string) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ChoseALPN", arg0)
}
// ChoseALPN indicates an expected call of ChoseALPN.
func (mr *MockConnectionTracerMockRecorder) ChoseALPN(arg0 any) *ConnectionTracerChoseALPNCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChoseALPN", reflect.TypeOf((*MockConnectionTracer)(nil).ChoseALPN), arg0)
return &ConnectionTracerChoseALPNCall{Call: call}
}
// ConnectionTracerChoseALPNCall wrap *gomock.Call
type ConnectionTracerChoseALPNCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ConnectionTracerChoseALPNCall) Return() *ConnectionTracerChoseALPNCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *ConnectionTracerChoseALPNCall) Do(f func(string)) *ConnectionTracerChoseALPNCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ConnectionTracerChoseALPNCall) DoAndReturn(f func(string)) *ConnectionTracerChoseALPNCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Close mocks base method.
func (m *MockConnectionTracer) Close() {
m.ctrl.T.Helper()

View file

@ -45,6 +45,7 @@ type ConnectionTracer interface {
LossTimerExpired(logging.TimerType, logging.EncryptionLevel)
LossTimerCanceled()
ECNStateUpdated(state logging.ECNState, trigger logging.ECNStateTrigger)
ChoseALPN(protocol string)
// Close is called when the connection is closed.
Close()
Debug(name, msg string)