mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
simplify mockgen usage for private interfaces (#3769)
This commit is contained in:
parent
379e7ec848
commit
c9a2f79b1c
35 changed files with 325 additions and 310 deletions
|
@ -123,7 +123,7 @@ var _ = Describe("Client", func() {
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
remoteAddrChan <- sconn.RemoteAddr().String()
|
remoteAddrChan <- sconn.RemoteAddr().String()
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
return conn
|
return conn
|
||||||
|
@ -156,7 +156,7 @@ var _ = Describe("Client", func() {
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
hostnameChan <- tlsConf.ServerName
|
hostnameChan <- tlsConf.ServerName
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
return conn
|
return conn
|
||||||
|
@ -189,7 +189,7 @@ var _ = Describe("Client", func() {
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
hostnameChan <- tlsConf.ServerName
|
hostnameChan <- tlsConf.ServerName
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
return conn
|
return conn
|
||||||
|
@ -228,7 +228,7 @@ var _ = Describe("Client", func() {
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
Expect(enable0RTT).To(BeFalse())
|
Expect(enable0RTT).To(BeFalse())
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run().Do(func() { close(run) })
|
conn.EXPECT().run().Do(func() { close(run) })
|
||||||
c := make(chan struct{})
|
c := make(chan struct{})
|
||||||
close(c)
|
close(c)
|
||||||
|
@ -271,7 +271,7 @@ var _ = Describe("Client", func() {
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
Expect(enable0RTT).To(BeTrue())
|
Expect(enable0RTT).To(BeTrue())
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run().Do(func() { <-done })
|
conn.EXPECT().run().Do(func() { <-done })
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
conn.EXPECT().earlyConnReady().Return(readyChan)
|
conn.EXPECT().earlyConnReady().Return(readyChan)
|
||||||
|
@ -318,7 +318,7 @@ var _ = Describe("Client", func() {
|
||||||
_ utils.Logger,
|
_ utils.Logger,
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run().Return(testErr)
|
conn.EXPECT().run().Return(testErr)
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
return conn
|
return conn
|
||||||
|
@ -341,7 +341,7 @@ var _ = Describe("Client", func() {
|
||||||
|
|
||||||
connRunning := make(chan struct{})
|
connRunning := make(chan struct{})
|
||||||
defer close(connRunning)
|
defer close(connRunning)
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run().Do(func() {
|
conn.EXPECT().run().Do(func() {
|
||||||
<-connRunning
|
<-connRunning
|
||||||
})
|
})
|
||||||
|
@ -393,7 +393,7 @@ var _ = Describe("Client", func() {
|
||||||
var sconn sendConn
|
var sconn sendConn
|
||||||
run := make(chan struct{})
|
run := make(chan struct{})
|
||||||
connCreated := make(chan struct{})
|
connCreated := make(chan struct{})
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
newClientConnection = func(
|
newClientConnection = func(
|
||||||
connP sendConn,
|
connP sendConn,
|
||||||
_ connRunner,
|
_ connRunner,
|
||||||
|
@ -535,7 +535,7 @@ var _ = Describe("Client", func() {
|
||||||
conf = configP
|
conf = configP
|
||||||
close(c)
|
close(c)
|
||||||
// TODO: check connection IDs?
|
// TODO: check connection IDs?
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
return conn
|
return conn
|
||||||
|
@ -570,7 +570,7 @@ var _ = Describe("Client", func() {
|
||||||
_ utils.Logger,
|
_ utils.Logger,
|
||||||
versionP protocol.VersionNumber,
|
versionP protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
conn.EXPECT().HandshakeComplete().Return(make(chan struct{}))
|
||||||
if counter == 0 {
|
if counter == 0 {
|
||||||
Expect(pn).To(BeZero())
|
Expect(pn).To(BeZero())
|
||||||
|
|
|
@ -1631,7 +1631,7 @@ var _ = Describe("Connection", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("sends a Path MTU probe packet", func() {
|
It("sends a Path MTU probe packet", func() {
|
||||||
mtuDiscoverer := NewMockMtuDiscoverer(mockCtrl)
|
mtuDiscoverer := NewMockMTUDiscoverer(mockCtrl)
|
||||||
conn.mtuDiscoverer = mtuDiscoverer
|
conn.mtuDiscoverer = mtuDiscoverer
|
||||||
conn.config.DisablePathMTUDiscovery = false
|
conn.config.DisablePathMTUDiscovery = false
|
||||||
sph.EXPECT().SentPacket(gomock.Any())
|
sph.EXPECT().SentPacket(gomock.Any())
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: roundtrip.go
|
// Source: github.com/quic-go/quic-go/http3 (interfaces: RoundTripCloser)
|
||||||
|
|
||||||
// Package http3 is a generated GoMock package.
|
// Package http3 is a generated GoMock package.
|
||||||
package http3
|
package http3
|
||||||
|
|
6
http3/mockgen.go
Normal file
6
http3/mockgen.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
//go:build gomock || generate
|
||||||
|
|
||||||
|
package http3
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package http3 -destination mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 RoundTripCloser"
|
||||||
|
type RoundTripCloser = roundTripCloser
|
|
@ -19,8 +19,6 @@ import (
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate sh -c "./../mockgen_private.sh http3 mock_roundtripcloser_test.go github.com/quic-go/quic-go/http3 roundTripCloser"
|
|
||||||
|
|
||||||
type mockBody struct {
|
type mockBody struct {
|
||||||
reader bytes.Reader
|
reader bytes.Reader
|
||||||
readErr error
|
readErr error
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: interfaces.go
|
// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: SentPacketTracker)
|
||||||
|
|
||||||
// Package ackhandler is a generated GoMock package.
|
// Package ackhandler is a generated GoMock package.
|
||||||
package ackhandler
|
package ackhandler
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
//go:build gomock || generate
|
||||||
|
|
||||||
package ackhandler
|
package ackhandler
|
||||||
|
|
||||||
//go:generate sh -c "../../mockgen_private.sh ackhandler mock_sent_packet_tracker_test.go github.com/quic-go/quic-go/internal/ackhandler sentPacketTracker"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/quic-go/quic-go/internal/ackhandler SentPacketTracker"
|
||||||
|
type SentPacketTracker = sentPacketTracker
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: interface.go
|
// Source: github.com/quic-go/quic-go/internal/handshake (interfaces: HandshakeRunner)
|
||||||
|
|
||||||
// Package handshake is a generated GoMock package.
|
// Package handshake is a generated GoMock package.
|
||||||
package handshake
|
package handshake
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
//go:build gomock || generate
|
||||||
|
|
||||||
package handshake
|
package handshake
|
||||||
|
|
||||||
//go:generate sh -c "../../mockgen_private.sh handshake mock_handshake_runner_test.go github.com/quic-go/quic-go/internal/handshake handshakeRunner"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package handshake -destination mock_handshake_runner_test.go github.com/quic-go/quic-go/internal/handshake HandshakeRunner"
|
||||||
|
type HandshakeRunner = handshakeRunner
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: packet_packer.go
|
// Source: github.com/quic-go/quic-go (interfaces: AckFrameSource)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -36,15 +36,15 @@ func (m *MockAckFrameSource) EXPECT() *MockAckFrameSourceMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAckFrame mocks base method.
|
// GetAckFrame mocks base method.
|
||||||
func (m *MockAckFrameSource) GetAckFrame(encLevel protocol.EncryptionLevel, onlyIfQueued bool) *wire.AckFrame {
|
func (m *MockAckFrameSource) GetAckFrame(arg0 protocol.EncryptionLevel, arg1 bool) *wire.AckFrame {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "GetAckFrame", encLevel, onlyIfQueued)
|
ret := m.ctrl.Call(m, "GetAckFrame", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*wire.AckFrame)
|
ret0, _ := ret[0].(*wire.AckFrame)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAckFrame indicates an expected call of GetAckFrame.
|
// GetAckFrame indicates an expected call of GetAckFrame.
|
||||||
func (mr *MockAckFrameSourceMockRecorder) GetAckFrame(encLevel, onlyIfQueued interface{}) *gomock.Call {
|
func (mr *MockAckFrameSourceMockRecorder) GetAckFrame(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAckFrame", reflect.TypeOf((*MockAckFrameSource)(nil).GetAckFrame), encLevel, onlyIfQueued)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAckFrame", reflect.TypeOf((*MockAckFrameSource)(nil).GetAckFrame), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
ipv4 "golang.org/x/net/ipv4"
|
ipv4 "golang.org/x/net/ipv4"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockBatchConn is a mock of BatchConn interface.
|
// MockBatchConn is a mock of batchConn interface.
|
||||||
type MockBatchConn struct {
|
type MockBatchConn struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
recorder *MockBatchConnMockRecorder
|
recorder *MockBatchConnMockRecorder
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: connection.go
|
// Source: github.com/quic-go/quic-go (interfaces: ConnRunner)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: crypto_stream_manager.go
|
// Source: github.com/quic-go/quic-go (interfaces: CryptoDataHandler)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: crypto_stream.go
|
// Source: github.com/quic-go/quic-go (interfaces: CryptoStream)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -106,16 +106,16 @@ func (mr *MockCryptoStreamMockRecorder) PopCryptoFrame(arg0 interface{}) *gomock
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write mocks base method.
|
// Write mocks base method.
|
||||||
func (m *MockCryptoStream) Write(p []byte) (int, error) {
|
func (m *MockCryptoStream) Write(arg0 []byte) (int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Write", p)
|
ret := m.ctrl.Call(m, "Write", arg0)
|
||||||
ret0, _ := ret[0].(int)
|
ret0, _ := ret[0].(int)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write indicates an expected call of Write.
|
// Write indicates an expected call of Write.
|
||||||
func (mr *MockCryptoStreamMockRecorder) Write(p interface{}) *gomock.Call {
|
func (mr *MockCryptoStreamMockRecorder) Write(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), arg0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: packet_packer.go
|
// Source: github.com/quic-go/quic-go (interfaces: FrameSource)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: mtu_discoverer.go
|
// Source: github.com/quic-go/quic-go (interfaces: MTUDiscoverer)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -13,31 +13,31 @@ import (
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockMtuDiscoverer is a mock of MtuDiscoverer interface.
|
// MockMTUDiscoverer is a mock of MTUDiscoverer interface.
|
||||||
type MockMtuDiscoverer struct {
|
type MockMTUDiscoverer struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
recorder *MockMtuDiscovererMockRecorder
|
recorder *MockMTUDiscovererMockRecorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// MockMtuDiscovererMockRecorder is the mock recorder for MockMtuDiscoverer.
|
// MockMTUDiscovererMockRecorder is the mock recorder for MockMTUDiscoverer.
|
||||||
type MockMtuDiscovererMockRecorder struct {
|
type MockMTUDiscovererMockRecorder struct {
|
||||||
mock *MockMtuDiscoverer
|
mock *MockMTUDiscoverer
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMockMtuDiscoverer creates a new mock instance.
|
// NewMockMTUDiscoverer creates a new mock instance.
|
||||||
func NewMockMtuDiscoverer(ctrl *gomock.Controller) *MockMtuDiscoverer {
|
func NewMockMTUDiscoverer(ctrl *gomock.Controller) *MockMTUDiscoverer {
|
||||||
mock := &MockMtuDiscoverer{ctrl: ctrl}
|
mock := &MockMTUDiscoverer{ctrl: ctrl}
|
||||||
mock.recorder = &MockMtuDiscovererMockRecorder{mock}
|
mock.recorder = &MockMTUDiscovererMockRecorder{mock}
|
||||||
return mock
|
return mock
|
||||||
}
|
}
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||||
func (m *MockMtuDiscoverer) EXPECT() *MockMtuDiscovererMockRecorder {
|
func (m *MockMTUDiscoverer) EXPECT() *MockMTUDiscovererMockRecorder {
|
||||||
return m.recorder
|
return m.recorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPing mocks base method.
|
// GetPing mocks base method.
|
||||||
func (m *MockMtuDiscoverer) GetPing() (ackhandler.Frame, protocol.ByteCount) {
|
func (m *MockMTUDiscoverer) GetPing() (ackhandler.Frame, protocol.ByteCount) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "GetPing")
|
ret := m.ctrl.Call(m, "GetPing")
|
||||||
ret0, _ := ret[0].(ackhandler.Frame)
|
ret0, _ := ret[0].(ackhandler.Frame)
|
||||||
|
@ -46,21 +46,21 @@ func (m *MockMtuDiscoverer) GetPing() (ackhandler.Frame, protocol.ByteCount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPing indicates an expected call of GetPing.
|
// GetPing indicates an expected call of GetPing.
|
||||||
func (mr *MockMtuDiscovererMockRecorder) GetPing() *gomock.Call {
|
func (mr *MockMTUDiscovererMockRecorder) GetPing() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPing", reflect.TypeOf((*MockMtuDiscoverer)(nil).GetPing))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPing", reflect.TypeOf((*MockMTUDiscoverer)(nil).GetPing))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ShouldSendProbe mocks base method.
|
// ShouldSendProbe mocks base method.
|
||||||
func (m *MockMtuDiscoverer) ShouldSendProbe(now time.Time) bool {
|
func (m *MockMTUDiscoverer) ShouldSendProbe(arg0 time.Time) bool {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ShouldSendProbe", now)
|
ret := m.ctrl.Call(m, "ShouldSendProbe", arg0)
|
||||||
ret0, _ := ret[0].(bool)
|
ret0, _ := ret[0].(bool)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// ShouldSendProbe indicates an expected call of ShouldSendProbe.
|
// ShouldSendProbe indicates an expected call of ShouldSendProbe.
|
||||||
func (mr *MockMtuDiscovererMockRecorder) ShouldSendProbe(now interface{}) *gomock.Call {
|
func (mr *MockMTUDiscovererMockRecorder) ShouldSendProbe(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSendProbe", reflect.TypeOf((*MockMtuDiscoverer)(nil).ShouldSendProbe), now)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSendProbe", reflect.TypeOf((*MockMTUDiscoverer)(nil).ShouldSendProbe), arg0)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: multiplexer.go
|
// Source: github.com/quic-go/quic-go (interfaces: Multiplexer)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -36,18 +36,18 @@ func (m *MockMultiplexer) EXPECT() *MockMultiplexerMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddConn mocks base method.
|
// AddConn mocks base method.
|
||||||
func (m *MockMultiplexer) AddConn(c net.PacketConn, connIDLen int, statelessResetKey *StatelessResetKey, tracer logging.Tracer) (packetHandlerManager, error) {
|
func (m *MockMultiplexer) AddConn(arg0 net.PacketConn, arg1 int, arg2 *StatelessResetKey, arg3 logging.Tracer) (packetHandlerManager, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "AddConn", c, connIDLen, statelessResetKey, tracer)
|
ret := m.ctrl.Call(m, "AddConn", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(packetHandlerManager)
|
ret0, _ := ret[0].(packetHandlerManager)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddConn indicates an expected call of AddConn.
|
// AddConn indicates an expected call of AddConn.
|
||||||
func (mr *MockMultiplexerMockRecorder) AddConn(c, connIDLen, statelessResetKey, tracer interface{}) *gomock.Call {
|
func (mr *MockMultiplexerMockRecorder) AddConn(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddConn", reflect.TypeOf((*MockMultiplexer)(nil).AddConn), c, connIDLen, statelessResetKey, tracer)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddConn", reflect.TypeOf((*MockMultiplexer)(nil).AddConn), arg0, arg1, arg2, arg3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveConn mocks base method.
|
// RemoveConn mocks base method.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: packet_packer.go
|
// Source: github.com/quic-go/quic-go (interfaces: Packer)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -81,18 +81,18 @@ func (mr *MockPackerMockRecorder) PackApplicationClose(arg0, arg1 interface{}) *
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackCoalescedPacket mocks base method.
|
// PackCoalescedPacket mocks base method.
|
||||||
func (m *MockPacker) PackCoalescedPacket(onlyAck bool, v protocol.VersionNumber) (*coalescedPacket, error) {
|
func (m *MockPacker) PackCoalescedPacket(arg0 bool, arg1 protocol.VersionNumber) (*coalescedPacket, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "PackCoalescedPacket", onlyAck, v)
|
ret := m.ctrl.Call(m, "PackCoalescedPacket", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*coalescedPacket)
|
ret0, _ := ret[0].(*coalescedPacket)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackCoalescedPacket indicates an expected call of PackCoalescedPacket.
|
// PackCoalescedPacket indicates an expected call of PackCoalescedPacket.
|
||||||
func (mr *MockPackerMockRecorder) PackCoalescedPacket(onlyAck, v interface{}) *gomock.Call {
|
func (mr *MockPackerMockRecorder) PackCoalescedPacket(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackCoalescedPacket", reflect.TypeOf((*MockPacker)(nil).PackCoalescedPacket), onlyAck, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackCoalescedPacket", reflect.TypeOf((*MockPacker)(nil).PackCoalescedPacket), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackConnectionClose mocks base method.
|
// PackConnectionClose mocks base method.
|
||||||
|
@ -111,9 +111,9 @@ func (mr *MockPackerMockRecorder) PackConnectionClose(arg0, arg1 interface{}) *g
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackMTUProbePacket mocks base method.
|
// PackMTUProbePacket mocks base method.
|
||||||
func (m *MockPacker) PackMTUProbePacket(ping ackhandler.Frame, size protocol.ByteCount, now time.Time, v protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
|
func (m *MockPacker) PackMTUProbePacket(arg0 ackhandler.Frame, arg1 protocol.ByteCount, arg2 time.Time, arg3 protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "PackMTUProbePacket", ping, size, now, v)
|
ret := m.ctrl.Call(m, "PackMTUProbePacket", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(shortHeaderPacket)
|
ret0, _ := ret[0].(shortHeaderPacket)
|
||||||
ret1, _ := ret[1].(*packetBuffer)
|
ret1, _ := ret[1].(*packetBuffer)
|
||||||
ret2, _ := ret[2].(error)
|
ret2, _ := ret[2].(error)
|
||||||
|
@ -121,15 +121,15 @@ func (m *MockPacker) PackMTUProbePacket(ping ackhandler.Frame, size protocol.Byt
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackMTUProbePacket indicates an expected call of PackMTUProbePacket.
|
// PackMTUProbePacket indicates an expected call of PackMTUProbePacket.
|
||||||
func (mr *MockPackerMockRecorder) PackMTUProbePacket(ping, size, now, v interface{}) *gomock.Call {
|
func (mr *MockPackerMockRecorder) PackMTUProbePacket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackMTUProbePacket", reflect.TypeOf((*MockPacker)(nil).PackMTUProbePacket), ping, size, now, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackMTUProbePacket", reflect.TypeOf((*MockPacker)(nil).PackMTUProbePacket), arg0, arg1, arg2, arg3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackPacket mocks base method.
|
// PackPacket mocks base method.
|
||||||
func (m *MockPacker) PackPacket(onlyAck bool, now time.Time, v protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
|
func (m *MockPacker) PackPacket(arg0 bool, arg1 time.Time, arg2 protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "PackPacket", onlyAck, now, v)
|
ret := m.ctrl.Call(m, "PackPacket", arg0, arg1, arg2)
|
||||||
ret0, _ := ret[0].(shortHeaderPacket)
|
ret0, _ := ret[0].(shortHeaderPacket)
|
||||||
ret1, _ := ret[1].(*packetBuffer)
|
ret1, _ := ret[1].(*packetBuffer)
|
||||||
ret2, _ := ret[2].(error)
|
ret2, _ := ret[2].(error)
|
||||||
|
@ -137,9 +137,9 @@ func (m *MockPacker) PackPacket(onlyAck bool, now time.Time, v protocol.VersionN
|
||||||
}
|
}
|
||||||
|
|
||||||
// PackPacket indicates an expected call of PackPacket.
|
// PackPacket indicates an expected call of PackPacket.
|
||||||
func (mr *MockPackerMockRecorder) PackPacket(onlyAck, now, v interface{}) *gomock.Call {
|
func (mr *MockPackerMockRecorder) PackPacket(arg0, arg1, arg2 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackPacket", reflect.TypeOf((*MockPacker)(nil).PackPacket), onlyAck, now, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackPacket", reflect.TypeOf((*MockPacker)(nil).PackPacket), arg0, arg1, arg2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetMaxPacketSize mocks base method.
|
// SetMaxPacketSize mocks base method.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: server.go
|
// Source: github.com/quic-go/quic-go (interfaces: PacketHandlerManager)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: server.go
|
// Source: github.com/quic-go/quic-go (interfaces: PacketHandler)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: server.go
|
// Source: github.com/quic-go/quic-go (interfaces: QUICConn)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -11,33 +11,34 @@ import (
|
||||||
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
||||||
|
qerr "github.com/quic-go/quic-go/internal/qerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockQuicConn is a mock of QuicConn interface.
|
// MockQUICConn is a mock of QUICConn interface.
|
||||||
type MockQuicConn struct {
|
type MockQUICConn struct {
|
||||||
ctrl *gomock.Controller
|
ctrl *gomock.Controller
|
||||||
recorder *MockQuicConnMockRecorder
|
recorder *MockQUICConnMockRecorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// MockQuicConnMockRecorder is the mock recorder for MockQuicConn.
|
// MockQUICConnMockRecorder is the mock recorder for MockQUICConn.
|
||||||
type MockQuicConnMockRecorder struct {
|
type MockQUICConnMockRecorder struct {
|
||||||
mock *MockQuicConn
|
mock *MockQUICConn
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMockQuicConn creates a new mock instance.
|
// NewMockQUICConn creates a new mock instance.
|
||||||
func NewMockQuicConn(ctrl *gomock.Controller) *MockQuicConn {
|
func NewMockQUICConn(ctrl *gomock.Controller) *MockQUICConn {
|
||||||
mock := &MockQuicConn{ctrl: ctrl}
|
mock := &MockQUICConn{ctrl: ctrl}
|
||||||
mock.recorder = &MockQuicConnMockRecorder{mock}
|
mock.recorder = &MockQUICConnMockRecorder{mock}
|
||||||
return mock
|
return mock
|
||||||
}
|
}
|
||||||
|
|
||||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||||
func (m *MockQuicConn) EXPECT() *MockQuicConnMockRecorder {
|
func (m *MockQUICConn) EXPECT() *MockQUICConnMockRecorder {
|
||||||
return m.recorder
|
return m.recorder
|
||||||
}
|
}
|
||||||
|
|
||||||
// AcceptStream mocks base method.
|
// AcceptStream mocks base method.
|
||||||
func (m *MockQuicConn) AcceptStream(arg0 context.Context) (Stream, error) {
|
func (m *MockQUICConn) AcceptStream(arg0 context.Context) (Stream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "AcceptStream", arg0)
|
ret := m.ctrl.Call(m, "AcceptStream", arg0)
|
||||||
ret0, _ := ret[0].(Stream)
|
ret0, _ := ret[0].(Stream)
|
||||||
|
@ -46,13 +47,13 @@ func (m *MockQuicConn) AcceptStream(arg0 context.Context) (Stream, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// AcceptStream indicates an expected call of AcceptStream.
|
// AcceptStream indicates an expected call of AcceptStream.
|
||||||
func (mr *MockQuicConnMockRecorder) AcceptStream(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) AcceptStream(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQuicConn)(nil).AcceptStream), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptStream), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AcceptUniStream mocks base method.
|
// AcceptUniStream mocks base method.
|
||||||
func (m *MockQuicConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) {
|
func (m *MockQUICConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "AcceptUniStream", arg0)
|
ret := m.ctrl.Call(m, "AcceptUniStream", arg0)
|
||||||
ret0, _ := ret[0].(ReceiveStream)
|
ret0, _ := ret[0].(ReceiveStream)
|
||||||
|
@ -61,13 +62,13 @@ func (m *MockQuicConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// AcceptUniStream indicates an expected call of AcceptUniStream.
|
// AcceptUniStream indicates an expected call of AcceptUniStream.
|
||||||
func (mr *MockQuicConnMockRecorder) AcceptUniStream(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) AcceptUniStream(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQuicConn)(nil).AcceptUniStream), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptUniStream), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CloseWithError mocks base method.
|
// CloseWithError mocks base method.
|
||||||
func (m *MockQuicConn) CloseWithError(arg0 ApplicationErrorCode, arg1 string) error {
|
func (m *MockQUICConn) CloseWithError(arg0 qerr.ApplicationErrorCode, arg1 string) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1)
|
ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
|
@ -75,13 +76,13 @@ func (m *MockQuicConn) CloseWithError(arg0 ApplicationErrorCode, arg1 string) er
|
||||||
}
|
}
|
||||||
|
|
||||||
// CloseWithError indicates an expected call of CloseWithError.
|
// CloseWithError indicates an expected call of CloseWithError.
|
||||||
func (mr *MockQuicConnMockRecorder) CloseWithError(arg0, arg1 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) CloseWithError(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQuicConn)(nil).CloseWithError), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQUICConn)(nil).CloseWithError), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConnectionState mocks base method.
|
// ConnectionState mocks base method.
|
||||||
func (m *MockQuicConn) ConnectionState() ConnectionState {
|
func (m *MockQUICConn) ConnectionState() ConnectionState {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ConnectionState")
|
ret := m.ctrl.Call(m, "ConnectionState")
|
||||||
ret0, _ := ret[0].(ConnectionState)
|
ret0, _ := ret[0].(ConnectionState)
|
||||||
|
@ -89,13 +90,13 @@ func (m *MockQuicConn) ConnectionState() ConnectionState {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConnectionState indicates an expected call of ConnectionState.
|
// ConnectionState indicates an expected call of ConnectionState.
|
||||||
func (mr *MockQuicConnMockRecorder) ConnectionState() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) ConnectionState() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQuicConn)(nil).ConnectionState))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQUICConn)(nil).ConnectionState))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context mocks base method.
|
// Context mocks base method.
|
||||||
func (m *MockQuicConn) Context() context.Context {
|
func (m *MockQUICConn) Context() context.Context {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Context")
|
ret := m.ctrl.Call(m, "Context")
|
||||||
ret0, _ := ret[0].(context.Context)
|
ret0, _ := ret[0].(context.Context)
|
||||||
|
@ -103,13 +104,13 @@ func (m *MockQuicConn) Context() context.Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Context indicates an expected call of Context.
|
// Context indicates an expected call of Context.
|
||||||
func (mr *MockQuicConnMockRecorder) Context() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) Context() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQuicConn)(nil).Context))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQUICConn)(nil).Context))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetVersion mocks base method.
|
// GetVersion mocks base method.
|
||||||
func (m *MockQuicConn) GetVersion() protocol.VersionNumber {
|
func (m *MockQUICConn) GetVersion() protocol.VersionNumber {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "GetVersion")
|
ret := m.ctrl.Call(m, "GetVersion")
|
||||||
ret0, _ := ret[0].(protocol.VersionNumber)
|
ret0, _ := ret[0].(protocol.VersionNumber)
|
||||||
|
@ -117,13 +118,13 @@ func (m *MockQuicConn) GetVersion() protocol.VersionNumber {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetVersion indicates an expected call of GetVersion.
|
// GetVersion indicates an expected call of GetVersion.
|
||||||
func (mr *MockQuicConnMockRecorder) GetVersion() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) GetVersion() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQuicConn)(nil).GetVersion))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQUICConn)(nil).GetVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandshakeComplete mocks base method.
|
// HandshakeComplete mocks base method.
|
||||||
func (m *MockQuicConn) HandshakeComplete() <-chan struct{} {
|
func (m *MockQUICConn) HandshakeComplete() <-chan struct{} {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "HandshakeComplete")
|
ret := m.ctrl.Call(m, "HandshakeComplete")
|
||||||
ret0, _ := ret[0].(<-chan struct{})
|
ret0, _ := ret[0].(<-chan struct{})
|
||||||
|
@ -131,13 +132,13 @@ func (m *MockQuicConn) HandshakeComplete() <-chan struct{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandshakeComplete indicates an expected call of HandshakeComplete.
|
// HandshakeComplete indicates an expected call of HandshakeComplete.
|
||||||
func (mr *MockQuicConnMockRecorder) HandshakeComplete() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) HandshakeComplete() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQuicConn)(nil).HandshakeComplete))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQUICConn)(nil).HandshakeComplete))
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocalAddr mocks base method.
|
// LocalAddr mocks base method.
|
||||||
func (m *MockQuicConn) LocalAddr() net.Addr {
|
func (m *MockQUICConn) LocalAddr() net.Addr {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "LocalAddr")
|
ret := m.ctrl.Call(m, "LocalAddr")
|
||||||
ret0, _ := ret[0].(net.Addr)
|
ret0, _ := ret[0].(net.Addr)
|
||||||
|
@ -145,13 +146,13 @@ func (m *MockQuicConn) LocalAddr() net.Addr {
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocalAddr indicates an expected call of LocalAddr.
|
// LocalAddr indicates an expected call of LocalAddr.
|
||||||
func (mr *MockQuicConnMockRecorder) LocalAddr() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) LocalAddr() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQuicConn)(nil).LocalAddr))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQUICConn)(nil).LocalAddr))
|
||||||
}
|
}
|
||||||
|
|
||||||
// NextConnection mocks base method.
|
// NextConnection mocks base method.
|
||||||
func (m *MockQuicConn) NextConnection() Connection {
|
func (m *MockQUICConn) NextConnection() Connection {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "NextConnection")
|
ret := m.ctrl.Call(m, "NextConnection")
|
||||||
ret0, _ := ret[0].(Connection)
|
ret0, _ := ret[0].(Connection)
|
||||||
|
@ -159,13 +160,13 @@ func (m *MockQuicConn) NextConnection() Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NextConnection indicates an expected call of NextConnection.
|
// NextConnection indicates an expected call of NextConnection.
|
||||||
func (mr *MockQuicConnMockRecorder) NextConnection() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) NextConnection() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockQuicConn)(nil).NextConnection))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockQUICConn)(nil).NextConnection))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenStream mocks base method.
|
// OpenStream mocks base method.
|
||||||
func (m *MockQuicConn) OpenStream() (Stream, error) {
|
func (m *MockQUICConn) OpenStream() (Stream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "OpenStream")
|
ret := m.ctrl.Call(m, "OpenStream")
|
||||||
ret0, _ := ret[0].(Stream)
|
ret0, _ := ret[0].(Stream)
|
||||||
|
@ -174,13 +175,13 @@ func (m *MockQuicConn) OpenStream() (Stream, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenStream indicates an expected call of OpenStream.
|
// OpenStream indicates an expected call of OpenStream.
|
||||||
func (mr *MockQuicConnMockRecorder) OpenStream() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) OpenStream() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQuicConn)(nil).OpenStream))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQUICConn)(nil).OpenStream))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenStreamSync mocks base method.
|
// OpenStreamSync mocks base method.
|
||||||
func (m *MockQuicConn) OpenStreamSync(arg0 context.Context) (Stream, error) {
|
func (m *MockQUICConn) OpenStreamSync(arg0 context.Context) (Stream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
|
ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
|
||||||
ret0, _ := ret[0].(Stream)
|
ret0, _ := ret[0].(Stream)
|
||||||
|
@ -189,13 +190,13 @@ func (m *MockQuicConn) OpenStreamSync(arg0 context.Context) (Stream, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenStreamSync indicates an expected call of OpenStreamSync.
|
// OpenStreamSync indicates an expected call of OpenStreamSync.
|
||||||
func (mr *MockQuicConnMockRecorder) OpenStreamSync(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) OpenStreamSync(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQuicConn)(nil).OpenStreamSync), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenStreamSync), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenUniStream mocks base method.
|
// OpenUniStream mocks base method.
|
||||||
func (m *MockQuicConn) OpenUniStream() (SendStream, error) {
|
func (m *MockQUICConn) OpenUniStream() (SendStream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "OpenUniStream")
|
ret := m.ctrl.Call(m, "OpenUniStream")
|
||||||
ret0, _ := ret[0].(SendStream)
|
ret0, _ := ret[0].(SendStream)
|
||||||
|
@ -204,13 +205,13 @@ func (m *MockQuicConn) OpenUniStream() (SendStream, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenUniStream indicates an expected call of OpenUniStream.
|
// OpenUniStream indicates an expected call of OpenUniStream.
|
||||||
func (mr *MockQuicConnMockRecorder) OpenUniStream() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) OpenUniStream() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQuicConn)(nil).OpenUniStream))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStream))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenUniStreamSync mocks base method.
|
// OpenUniStreamSync mocks base method.
|
||||||
func (m *MockQuicConn) OpenUniStreamSync(arg0 context.Context) (SendStream, error) {
|
func (m *MockQUICConn) OpenUniStreamSync(arg0 context.Context) (SendStream, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
|
ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
|
||||||
ret0, _ := ret[0].(SendStream)
|
ret0, _ := ret[0].(SendStream)
|
||||||
|
@ -219,13 +220,13 @@ func (m *MockQuicConn) OpenUniStreamSync(arg0 context.Context) (SendStream, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenUniStreamSync indicates an expected call of OpenUniStreamSync.
|
// OpenUniStreamSync indicates an expected call of OpenUniStreamSync.
|
||||||
func (mr *MockQuicConnMockRecorder) OpenUniStreamSync(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) OpenUniStreamSync(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQuicConn)(nil).OpenUniStreamSync), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStreamSync), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReceiveMessage mocks base method.
|
// ReceiveMessage mocks base method.
|
||||||
func (m *MockQuicConn) ReceiveMessage() ([]byte, error) {
|
func (m *MockQUICConn) ReceiveMessage() ([]byte, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "ReceiveMessage")
|
ret := m.ctrl.Call(m, "ReceiveMessage")
|
||||||
ret0, _ := ret[0].([]byte)
|
ret0, _ := ret[0].([]byte)
|
||||||
|
@ -234,13 +235,13 @@ func (m *MockQuicConn) ReceiveMessage() ([]byte, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReceiveMessage indicates an expected call of ReceiveMessage.
|
// ReceiveMessage indicates an expected call of ReceiveMessage.
|
||||||
func (mr *MockQuicConnMockRecorder) ReceiveMessage() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) ReceiveMessage() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveMessage", reflect.TypeOf((*MockQuicConn)(nil).ReceiveMessage))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveMessage", reflect.TypeOf((*MockQUICConn)(nil).ReceiveMessage))
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoteAddr mocks base method.
|
// RemoteAddr mocks base method.
|
||||||
func (m *MockQuicConn) RemoteAddr() net.Addr {
|
func (m *MockQUICConn) RemoteAddr() net.Addr {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "RemoteAddr")
|
ret := m.ctrl.Call(m, "RemoteAddr")
|
||||||
ret0, _ := ret[0].(net.Addr)
|
ret0, _ := ret[0].(net.Addr)
|
||||||
|
@ -248,13 +249,13 @@ func (m *MockQuicConn) RemoteAddr() net.Addr {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoteAddr indicates an expected call of RemoteAddr.
|
// RemoteAddr indicates an expected call of RemoteAddr.
|
||||||
func (mr *MockQuicConnMockRecorder) RemoteAddr() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) RemoteAddr() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQuicConn)(nil).RemoteAddr))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQUICConn)(nil).RemoteAddr))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage mocks base method.
|
// SendMessage mocks base method.
|
||||||
func (m *MockQuicConn) SendMessage(arg0 []byte) error {
|
func (m *MockQUICConn) SendMessage(arg0 []byte) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SendMessage", arg0)
|
ret := m.ctrl.Call(m, "SendMessage", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
|
@ -262,25 +263,25 @@ func (m *MockQuicConn) SendMessage(arg0 []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage indicates an expected call of SendMessage.
|
// SendMessage indicates an expected call of SendMessage.
|
||||||
func (mr *MockQuicConnMockRecorder) SendMessage(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) SendMessage(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockQuicConn)(nil).SendMessage), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockQUICConn)(nil).SendMessage), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy mocks base method.
|
// destroy mocks base method.
|
||||||
func (m *MockQuicConn) destroy(arg0 error) {
|
func (m *MockQUICConn) destroy(arg0 error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "destroy", arg0)
|
m.ctrl.Call(m, "destroy", arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy indicates an expected call of destroy.
|
// destroy indicates an expected call of destroy.
|
||||||
func (mr *MockQuicConnMockRecorder) destroy(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) destroy(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQuicConn)(nil).destroy), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQUICConn)(nil).destroy), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// earlyConnReady mocks base method.
|
// earlyConnReady mocks base method.
|
||||||
func (m *MockQuicConn) earlyConnReady() <-chan struct{} {
|
func (m *MockQUICConn) earlyConnReady() <-chan struct{} {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "earlyConnReady")
|
ret := m.ctrl.Call(m, "earlyConnReady")
|
||||||
ret0, _ := ret[0].(<-chan struct{})
|
ret0, _ := ret[0].(<-chan struct{})
|
||||||
|
@ -288,13 +289,13 @@ func (m *MockQuicConn) earlyConnReady() <-chan struct{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
// earlyConnReady indicates an expected call of earlyConnReady.
|
// earlyConnReady indicates an expected call of earlyConnReady.
|
||||||
func (mr *MockQuicConnMockRecorder) earlyConnReady() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) earlyConnReady() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlyConnReady", reflect.TypeOf((*MockQuicConn)(nil).earlyConnReady))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlyConnReady", reflect.TypeOf((*MockQUICConn)(nil).earlyConnReady))
|
||||||
}
|
}
|
||||||
|
|
||||||
// getPerspective mocks base method.
|
// getPerspective mocks base method.
|
||||||
func (m *MockQuicConn) getPerspective() protocol.Perspective {
|
func (m *MockQUICConn) getPerspective() protocol.Perspective {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "getPerspective")
|
ret := m.ctrl.Call(m, "getPerspective")
|
||||||
ret0, _ := ret[0].(protocol.Perspective)
|
ret0, _ := ret[0].(protocol.Perspective)
|
||||||
|
@ -302,25 +303,25 @@ func (m *MockQuicConn) getPerspective() protocol.Perspective {
|
||||||
}
|
}
|
||||||
|
|
||||||
// getPerspective indicates an expected call of getPerspective.
|
// getPerspective indicates an expected call of getPerspective.
|
||||||
func (mr *MockQuicConnMockRecorder) getPerspective() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) getPerspective() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQuicConn)(nil).getPerspective))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQUICConn)(nil).getPerspective))
|
||||||
}
|
}
|
||||||
|
|
||||||
// handlePacket mocks base method.
|
// handlePacket mocks base method.
|
||||||
func (m *MockQuicConn) handlePacket(arg0 *receivedPacket) {
|
func (m *MockQUICConn) handlePacket(arg0 *receivedPacket) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "handlePacket", arg0)
|
m.ctrl.Call(m, "handlePacket", arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// handlePacket indicates an expected call of handlePacket.
|
// handlePacket indicates an expected call of handlePacket.
|
||||||
func (mr *MockQuicConnMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQuicConn)(nil).handlePacket), arg0)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQUICConn)(nil).handlePacket), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// run mocks base method.
|
// run mocks base method.
|
||||||
func (m *MockQuicConn) run() error {
|
func (m *MockQUICConn) run() error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "run")
|
ret := m.ctrl.Call(m, "run")
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
|
@ -328,19 +329,19 @@ func (m *MockQuicConn) run() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// run indicates an expected call of run.
|
// run indicates an expected call of run.
|
||||||
func (mr *MockQuicConnMockRecorder) run() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) run() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQuicConn)(nil).run))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQUICConn)(nil).run))
|
||||||
}
|
}
|
||||||
|
|
||||||
// shutdown mocks base method.
|
// shutdown mocks base method.
|
||||||
func (m *MockQuicConn) shutdown() {
|
func (m *MockQUICConn) shutdown() {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "shutdown")
|
m.ctrl.Call(m, "shutdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
// shutdown indicates an expected call of shutdown.
|
// shutdown indicates an expected call of shutdown.
|
||||||
func (mr *MockQuicConnMockRecorder) shutdown() *gomock.Call {
|
func (mr *MockQUICConnMockRecorder) shutdown() *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "shutdown", reflect.TypeOf((*MockQuicConn)(nil).shutdown))
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "shutdown", reflect.TypeOf((*MockQUICConn)(nil).shutdown))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: receive_stream.go
|
// Source: github.com/quic-go/quic-go (interfaces: ReceiveStreamI)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -10,6 +10,7 @@ import (
|
||||||
|
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
||||||
|
qerr "github.com/quic-go/quic-go/internal/qerr"
|
||||||
wire "github.com/quic-go/quic-go/internal/wire"
|
wire "github.com/quic-go/quic-go/internal/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ func (m *MockReceiveStreamI) EXPECT() *MockReceiveStreamIMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CancelRead mocks base method.
|
// CancelRead mocks base method.
|
||||||
func (m *MockReceiveStreamI) CancelRead(arg0 StreamErrorCode) {
|
func (m *MockReceiveStreamI) CancelRead(arg0 qerr.StreamErrorCode) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "CancelRead", arg0)
|
m.ctrl.Call(m, "CancelRead", arg0)
|
||||||
}
|
}
|
||||||
|
@ -49,39 +50,39 @@ func (mr *MockReceiveStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.C
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read mocks base method.
|
// Read mocks base method.
|
||||||
func (m *MockReceiveStreamI) Read(p []byte) (int, error) {
|
func (m *MockReceiveStreamI) Read(arg0 []byte) (int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Read", p)
|
ret := m.ctrl.Call(m, "Read", arg0)
|
||||||
ret0, _ := ret[0].(int)
|
ret0, _ := ret[0].(int)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read indicates an expected call of Read.
|
// Read indicates an expected call of Read.
|
||||||
func (mr *MockReceiveStreamIMockRecorder) Read(p interface{}) *gomock.Call {
|
func (mr *MockReceiveStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReceiveStreamI)(nil).Read), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReceiveStreamI)(nil).Read), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetReadDeadline mocks base method.
|
// SetReadDeadline mocks base method.
|
||||||
func (m *MockReceiveStreamI) SetReadDeadline(t time.Time) error {
|
func (m *MockReceiveStreamI) SetReadDeadline(arg0 time.Time) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SetReadDeadline", t)
|
ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetReadDeadline indicates an expected call of SetReadDeadline.
|
// SetReadDeadline indicates an expected call of SetReadDeadline.
|
||||||
func (mr *MockReceiveStreamIMockRecorder) SetReadDeadline(t interface{}) *gomock.Call {
|
func (mr *MockReceiveStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockReceiveStreamI)(nil).SetReadDeadline), t)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockReceiveStreamI)(nil).SetReadDeadline), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StreamID mocks base method.
|
// StreamID mocks base method.
|
||||||
func (m *MockReceiveStreamI) StreamID() StreamID {
|
func (m *MockReceiveStreamI) StreamID() protocol.StreamID {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StreamID")
|
ret := m.ctrl.Call(m, "StreamID")
|
||||||
ret0, _ := ret[0].(StreamID)
|
ret0, _ := ret[0].(protocol.StreamID)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: packet_packer.go
|
// Source: github.com/quic-go/quic-go (interfaces: SealingManager)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: send_conn.go
|
// Source: github.com/quic-go/quic-go (interfaces: SendConn)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: send_stream.go
|
// Source: github.com/quic-go/quic-go (interfaces: SendStreamI)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -12,6 +12,7 @@ import (
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
ackhandler "github.com/quic-go/quic-go/internal/ackhandler"
|
ackhandler "github.com/quic-go/quic-go/internal/ackhandler"
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
||||||
|
qerr "github.com/quic-go/quic-go/internal/qerr"
|
||||||
wire "github.com/quic-go/quic-go/internal/wire"
|
wire "github.com/quic-go/quic-go/internal/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -39,7 +40,7 @@ func (m *MockSendStreamI) EXPECT() *MockSendStreamIMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CancelWrite mocks base method.
|
// CancelWrite mocks base method.
|
||||||
func (m *MockSendStreamI) CancelWrite(arg0 StreamErrorCode) {
|
func (m *MockSendStreamI) CancelWrite(arg0 qerr.StreamErrorCode) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "CancelWrite", arg0)
|
m.ctrl.Call(m, "CancelWrite", arg0)
|
||||||
}
|
}
|
||||||
|
@ -79,24 +80,24 @@ func (mr *MockSendStreamIMockRecorder) Context() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWriteDeadline mocks base method.
|
// SetWriteDeadline mocks base method.
|
||||||
func (m *MockSendStreamI) SetWriteDeadline(t time.Time) error {
|
func (m *MockSendStreamI) SetWriteDeadline(arg0 time.Time) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SetWriteDeadline", t)
|
ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
|
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
|
||||||
func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(t interface{}) *gomock.Call {
|
func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), t)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StreamID mocks base method.
|
// StreamID mocks base method.
|
||||||
func (m *MockSendStreamI) StreamID() StreamID {
|
func (m *MockSendStreamI) StreamID() protocol.StreamID {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StreamID")
|
ret := m.ctrl.Call(m, "StreamID")
|
||||||
ret0, _ := ret[0].(StreamID)
|
ret0, _ := ret[0].(protocol.StreamID)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,18 +108,18 @@ func (mr *MockSendStreamIMockRecorder) StreamID() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write mocks base method.
|
// Write mocks base method.
|
||||||
func (m *MockSendStreamI) Write(p []byte) (int, error) {
|
func (m *MockSendStreamI) Write(arg0 []byte) (int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Write", p)
|
ret := m.ctrl.Call(m, "Write", arg0)
|
||||||
ret0, _ := ret[0].(int)
|
ret0, _ := ret[0].(int)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write indicates an expected call of Write.
|
// Write indicates an expected call of Write.
|
||||||
func (mr *MockSendStreamIMockRecorder) Write(p interface{}) *gomock.Call {
|
func (mr *MockSendStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// closeForShutdown mocks base method.
|
// closeForShutdown mocks base method.
|
||||||
|
@ -160,18 +161,18 @@ func (mr *MockSendStreamIMockRecorder) hasData() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// popStreamFrame mocks base method.
|
// popStreamFrame mocks base method.
|
||||||
func (m *MockSendStreamI) popStreamFrame(maxBytes protocol.ByteCount, v protocol.VersionNumber) (*ackhandler.Frame, bool) {
|
func (m *MockSendStreamI) popStreamFrame(arg0 protocol.ByteCount, arg1 protocol.VersionNumber) (*ackhandler.Frame, bool) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "popStreamFrame", maxBytes, v)
|
ret := m.ctrl.Call(m, "popStreamFrame", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*ackhandler.Frame)
|
ret0, _ := ret[0].(*ackhandler.Frame)
|
||||||
ret1, _ := ret[1].(bool)
|
ret1, _ := ret[1].(bool)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// popStreamFrame indicates an expected call of popStreamFrame.
|
// popStreamFrame indicates an expected call of popStreamFrame.
|
||||||
func (mr *MockSendStreamIMockRecorder) popStreamFrame(maxBytes, v interface{}) *gomock.Call {
|
func (mr *MockSendStreamIMockRecorder) popStreamFrame(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), maxBytes, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateSendWindow mocks base method.
|
// updateSendWindow mocks base method.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: send_queue.go
|
// Source: github.com/quic-go/quic-go (interfaces: Sender)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -74,15 +74,15 @@ func (mr *MockSenderMockRecorder) Run() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send mocks base method.
|
// Send mocks base method.
|
||||||
func (m *MockSender) Send(p *packetBuffer) {
|
func (m *MockSender) Send(arg0 *packetBuffer) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "Send", p)
|
m.ctrl.Call(m, "Send", arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send indicates an expected call of Send.
|
// Send indicates an expected call of Send.
|
||||||
func (mr *MockSenderMockRecorder) Send(p interface{}) *gomock.Call {
|
func (mr *MockSenderMockRecorder) Send(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockSender)(nil).Send), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockSender)(nil).Send), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WouldBlock mocks base method.
|
// WouldBlock mocks base method.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: connection.go
|
// Source: github.com/quic-go/quic-go (interfaces: StreamGetter)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: stream.go
|
// Source: github.com/quic-go/quic-go (interfaces: StreamI)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -12,6 +12,7 @@ import (
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
ackhandler "github.com/quic-go/quic-go/internal/ackhandler"
|
ackhandler "github.com/quic-go/quic-go/internal/ackhandler"
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/quic-go/quic-go/internal/protocol"
|
||||||
|
qerr "github.com/quic-go/quic-go/internal/qerr"
|
||||||
wire "github.com/quic-go/quic-go/internal/wire"
|
wire "github.com/quic-go/quic-go/internal/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -39,7 +40,7 @@ func (m *MockStreamI) EXPECT() *MockStreamIMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CancelRead mocks base method.
|
// CancelRead mocks base method.
|
||||||
func (m *MockStreamI) CancelRead(arg0 StreamErrorCode) {
|
func (m *MockStreamI) CancelRead(arg0 qerr.StreamErrorCode) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "CancelRead", arg0)
|
m.ctrl.Call(m, "CancelRead", arg0)
|
||||||
}
|
}
|
||||||
|
@ -51,7 +52,7 @@ func (mr *MockStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CancelWrite mocks base method.
|
// CancelWrite mocks base method.
|
||||||
func (m *MockStreamI) CancelWrite(arg0 StreamErrorCode) {
|
func (m *MockStreamI) CancelWrite(arg0 qerr.StreamErrorCode) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
m.ctrl.Call(m, "CancelWrite", arg0)
|
m.ctrl.Call(m, "CancelWrite", arg0)
|
||||||
}
|
}
|
||||||
|
@ -91,67 +92,67 @@ func (mr *MockStreamIMockRecorder) Context() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read mocks base method.
|
// Read mocks base method.
|
||||||
func (m *MockStreamI) Read(p []byte) (int, error) {
|
func (m *MockStreamI) Read(arg0 []byte) (int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Read", p)
|
ret := m.ctrl.Call(m, "Read", arg0)
|
||||||
ret0, _ := ret[0].(int)
|
ret0, _ := ret[0].(int)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read indicates an expected call of Read.
|
// Read indicates an expected call of Read.
|
||||||
func (mr *MockStreamIMockRecorder) Read(p interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStreamI)(nil).Read), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStreamI)(nil).Read), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDeadline mocks base method.
|
// SetDeadline mocks base method.
|
||||||
func (m *MockStreamI) SetDeadline(t time.Time) error {
|
func (m *MockStreamI) SetDeadline(arg0 time.Time) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SetDeadline", t)
|
ret := m.ctrl.Call(m, "SetDeadline", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDeadline indicates an expected call of SetDeadline.
|
// SetDeadline indicates an expected call of SetDeadline.
|
||||||
func (mr *MockStreamIMockRecorder) SetDeadline(t interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStreamI)(nil).SetDeadline), t)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStreamI)(nil).SetDeadline), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetReadDeadline mocks base method.
|
// SetReadDeadline mocks base method.
|
||||||
func (m *MockStreamI) SetReadDeadline(t time.Time) error {
|
func (m *MockStreamI) SetReadDeadline(arg0 time.Time) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SetReadDeadline", t)
|
ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetReadDeadline indicates an expected call of SetReadDeadline.
|
// SetReadDeadline indicates an expected call of SetReadDeadline.
|
||||||
func (mr *MockStreamIMockRecorder) SetReadDeadline(t interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStreamI)(nil).SetReadDeadline), t)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStreamI)(nil).SetReadDeadline), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWriteDeadline mocks base method.
|
// SetWriteDeadline mocks base method.
|
||||||
func (m *MockStreamI) SetWriteDeadline(t time.Time) error {
|
func (m *MockStreamI) SetWriteDeadline(arg0 time.Time) error {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "SetWriteDeadline", t)
|
ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
|
||||||
ret0, _ := ret[0].(error)
|
ret0, _ := ret[0].(error)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
|
// SetWriteDeadline indicates an expected call of SetWriteDeadline.
|
||||||
func (mr *MockStreamIMockRecorder) SetWriteDeadline(t interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStreamI)(nil).SetWriteDeadline), t)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStreamI)(nil).SetWriteDeadline), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StreamID mocks base method.
|
// StreamID mocks base method.
|
||||||
func (m *MockStreamI) StreamID() StreamID {
|
func (m *MockStreamI) StreamID() protocol.StreamID {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "StreamID")
|
ret := m.ctrl.Call(m, "StreamID")
|
||||||
ret0, _ := ret[0].(StreamID)
|
ret0, _ := ret[0].(protocol.StreamID)
|
||||||
return ret0
|
return ret0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,18 +163,18 @@ func (mr *MockStreamIMockRecorder) StreamID() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write mocks base method.
|
// Write mocks base method.
|
||||||
func (m *MockStreamI) Write(p []byte) (int, error) {
|
func (m *MockStreamI) Write(arg0 []byte) (int, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "Write", p)
|
ret := m.ctrl.Call(m, "Write", arg0)
|
||||||
ret0, _ := ret[0].(int)
|
ret0, _ := ret[0].(int)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write indicates an expected call of Write.
|
// Write indicates an expected call of Write.
|
||||||
func (mr *MockStreamIMockRecorder) Write(p interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamI)(nil).Write), p)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamI)(nil).Write), arg0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// closeForShutdown mocks base method.
|
// closeForShutdown mocks base method.
|
||||||
|
@ -257,18 +258,18 @@ func (mr *MockStreamIMockRecorder) hasData() *gomock.Call {
|
||||||
}
|
}
|
||||||
|
|
||||||
// popStreamFrame mocks base method.
|
// popStreamFrame mocks base method.
|
||||||
func (m *MockStreamI) popStreamFrame(maxBytes protocol.ByteCount, v protocol.VersionNumber) (*ackhandler.Frame, bool) {
|
func (m *MockStreamI) popStreamFrame(arg0 protocol.ByteCount, arg1 protocol.VersionNumber) (*ackhandler.Frame, bool) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "popStreamFrame", maxBytes, v)
|
ret := m.ctrl.Call(m, "popStreamFrame", arg0, arg1)
|
||||||
ret0, _ := ret[0].(*ackhandler.Frame)
|
ret0, _ := ret[0].(*ackhandler.Frame)
|
||||||
ret1, _ := ret[1].(bool)
|
ret1, _ := ret[1].(bool)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// popStreamFrame indicates an expected call of popStreamFrame.
|
// popStreamFrame indicates an expected call of popStreamFrame.
|
||||||
func (mr *MockStreamIMockRecorder) popStreamFrame(maxBytes, v interface{}) *gomock.Call {
|
func (mr *MockStreamIMockRecorder) popStreamFrame(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockStreamI)(nil).popStreamFrame), maxBytes, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockStreamI)(nil).popStreamFrame), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateSendWindow mocks base method.
|
// updateSendWindow mocks base method.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: connection.go
|
// Source: github.com/quic-go/quic-go (interfaces: StreamManager)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: stream.go
|
// Source: github.com/quic-go/quic-go (interfaces: StreamSender)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: server.go
|
// Source: github.com/quic-go/quic-go (interfaces: UnknownPacketHandler)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: connection.go
|
// Source: github.com/quic-go/quic-go (interfaces: Unpacker)
|
||||||
|
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -37,24 +37,24 @@ func (m *MockUnpacker) EXPECT() *MockUnpackerMockRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnpackLongHeader mocks base method.
|
// UnpackLongHeader mocks base method.
|
||||||
func (m *MockUnpacker) UnpackLongHeader(hdr *wire.Header, rcvTime time.Time, data []byte, v protocol.VersionNumber) (*unpackedPacket, error) {
|
func (m *MockUnpacker) UnpackLongHeader(arg0 *wire.Header, arg1 time.Time, arg2 []byte, arg3 protocol.VersionNumber) (*unpackedPacket, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "UnpackLongHeader", hdr, rcvTime, data, v)
|
ret := m.ctrl.Call(m, "UnpackLongHeader", arg0, arg1, arg2, arg3)
|
||||||
ret0, _ := ret[0].(*unpackedPacket)
|
ret0, _ := ret[0].(*unpackedPacket)
|
||||||
ret1, _ := ret[1].(error)
|
ret1, _ := ret[1].(error)
|
||||||
return ret0, ret1
|
return ret0, ret1
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnpackLongHeader indicates an expected call of UnpackLongHeader.
|
// UnpackLongHeader indicates an expected call of UnpackLongHeader.
|
||||||
func (mr *MockUnpackerMockRecorder) UnpackLongHeader(hdr, rcvTime, data, v interface{}) *gomock.Call {
|
func (mr *MockUnpackerMockRecorder) UnpackLongHeader(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackLongHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackLongHeader), hdr, rcvTime, data, v)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackLongHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackLongHeader), arg0, arg1, arg2, arg3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnpackShortHeader mocks base method.
|
// UnpackShortHeader mocks base method.
|
||||||
func (m *MockUnpacker) UnpackShortHeader(rcvTime time.Time, data []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error) {
|
func (m *MockUnpacker) UnpackShortHeader(arg0 time.Time, arg1 []byte) (protocol.PacketNumber, protocol.PacketNumberLen, protocol.KeyPhaseBit, []byte, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
ret := m.ctrl.Call(m, "UnpackShortHeader", rcvTime, data)
|
ret := m.ctrl.Call(m, "UnpackShortHeader", arg0, arg1)
|
||||||
ret0, _ := ret[0].(protocol.PacketNumber)
|
ret0, _ := ret[0].(protocol.PacketNumber)
|
||||||
ret1, _ := ret[1].(protocol.PacketNumberLen)
|
ret1, _ := ret[1].(protocol.PacketNumberLen)
|
||||||
ret2, _ := ret[2].(protocol.KeyPhaseBit)
|
ret2, _ := ret[2].(protocol.KeyPhaseBit)
|
||||||
|
@ -64,7 +64,7 @@ func (m *MockUnpacker) UnpackShortHeader(rcvTime time.Time, data []byte) (protoc
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnpackShortHeader indicates an expected call of UnpackShortHeader.
|
// UnpackShortHeader indicates an expected call of UnpackShortHeader.
|
||||||
func (mr *MockUnpackerMockRecorder) UnpackShortHeader(rcvTime, data interface{}) *gomock.Call {
|
func (mr *MockUnpackerMockRecorder) UnpackShortHeader(arg0, arg1 interface{}) *gomock.Call {
|
||||||
mr.mock.ctrl.T.Helper()
|
mr.mock.ctrl.T.Helper()
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackShortHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackShortHeader), rcvTime, data)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnpackShortHeader", reflect.TypeOf((*MockUnpacker)(nil).UnpackShortHeader), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
100
mockgen.go
100
mockgen.go
|
@ -1,27 +1,77 @@
|
||||||
|
//go:build gomock || generate
|
||||||
|
|
||||||
package quic
|
package quic
|
||||||
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_send_conn_test.go github.com/quic-go/quic-go sendConn"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_conn_test.go github.com/quic-go/quic-go SendConn"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_sender_test.go github.com/quic-go/quic-go sender"
|
type SendConn = sendConn
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_stream_internal_test.go github.com/quic-go/quic-go streamI"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_crypto_stream_test.go github.com/quic-go/quic-go cryptoStream"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sender_test.go github.com/quic-go/quic-go Sender"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_receive_stream_internal_test.go github.com/quic-go/quic-go receiveStreamI"
|
type Sender = sender
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_send_stream_internal_test.go github.com/quic-go/quic-go sendStreamI"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_stream_sender_test.go github.com/quic-go/quic-go streamSender"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_internal_test.go github.com/quic-go/quic-go StreamI"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_stream_getter_test.go github.com/quic-go/quic-go streamGetter"
|
type StreamI = streamI
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_crypto_data_handler_test.go github.com/quic-go/quic-go cryptoDataHandler"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_frame_source_test.go github.com/quic-go/quic-go frameSource"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_stream_test.go github.com/quic-go/quic-go CryptoStream"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_ack_frame_source_test.go github.com/quic-go/quic-go ackFrameSource"
|
type CryptoStream = cryptoStream
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_stream_manager_test.go github.com/quic-go/quic-go streamManager"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_sealing_manager_test.go github.com/quic-go/quic-go sealingManager"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_receive_stream_internal_test.go github.com/quic-go/quic-go ReceiveStreamI"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_unpacker_test.go github.com/quic-go/quic-go unpacker"
|
type ReceiveStreamI = receiveStreamI
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_packer_test.go github.com/quic-go/quic-go packer"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_mtu_discoverer_test.go github.com/quic-go/quic-go mtuDiscoverer"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_send_stream_internal_test.go github.com/quic-go/quic-go SendStreamI"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_conn_runner_test.go github.com/quic-go/quic-go connRunner"
|
type SendStreamI = sendStreamI
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_quic_conn_test.go github.com/quic-go/quic-go quicConn"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_packet_handler_test.go github.com/quic-go/quic-go packetHandler"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_getter_test.go github.com/quic-go/quic-go StreamGetter"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_unknown_packet_handler_test.go github.com/quic-go/quic-go unknownPacketHandler"
|
type StreamGetter = streamGetter
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_packet_handler_manager_test.go github.com/quic-go/quic-go packetHandlerManager"
|
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_multiplexer_test.go github.com/quic-go/quic-go multiplexer"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_sender_test.go github.com/quic-go/quic-go StreamSender"
|
||||||
//go:generate sh -c "./mockgen_private.sh quic mock_batch_conn_test.go github.com/quic-go/quic-go batchConn"
|
type StreamSender = streamSender
|
||||||
//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -destination mock_token_store_test.go github.com/quic-go/quic-go TokenStore"
|
|
||||||
//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -destination mock_packetconn_test.go net PacketConn"
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_data_handler_test.go github.com/quic-go/quic-go CryptoDataHandler"
|
||||||
|
type CryptoDataHandler = cryptoDataHandler
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_frame_source_test.go github.com/quic-go/quic-go FrameSource"
|
||||||
|
type FrameSource = frameSource
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_ack_frame_source_test.go github.com/quic-go/quic-go AckFrameSource"
|
||||||
|
type AckFrameSource = ackFrameSource
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_stream_manager_test.go github.com/quic-go/quic-go StreamManager"
|
||||||
|
type StreamManager = streamManager
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_sealing_manager_test.go github.com/quic-go/quic-go SealingManager"
|
||||||
|
type SealingManager = sealingManager
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unpacker_test.go github.com/quic-go/quic-go Unpacker"
|
||||||
|
type Unpacker = unpacker
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packer_test.go github.com/quic-go/quic-go Packer"
|
||||||
|
type Packer = packer
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_mtu_discoverer_test.go github.com/quic-go/quic-go MTUDiscoverer"
|
||||||
|
type MTUDiscoverer = mtuDiscoverer
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_conn_runner_test.go github.com/quic-go/quic-go ConnRunner"
|
||||||
|
type ConnRunner = connRunner
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_quic_conn_test.go github.com/quic-go/quic-go QUICConn"
|
||||||
|
type QUICConn = quicConn
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_test.go github.com/quic-go/quic-go PacketHandler"
|
||||||
|
type PacketHandler = packetHandler
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_unknown_packet_handler_test.go github.com/quic-go/quic-go UnknownPacketHandler"
|
||||||
|
type UnknownPacketHandler = unknownPacketHandler
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager"
|
||||||
|
type PacketHandlerManager = packetHandlerManager
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -build_flags=\"-tags=gomock\" -package quic -self_package github.com/quic-go/quic-go -destination mock_multiplexer_test.go github.com/quic-go/quic-go Multiplexer"
|
||||||
|
type Multiplexer = multiplexer
|
||||||
|
|
||||||
|
// Need to use source mode for the batchConn, since reflect mode follows type aliases.
|
||||||
|
// See https://github.com/golang/mock/issues/244 for details.
|
||||||
|
//
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn"
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_token_store_test.go github.com/quic-go/quic-go TokenStore"
|
||||||
|
//go:generate sh -c "go run github.com/golang/mock/mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_packetconn_test.go net PacketConn"
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
DEST=$2
|
|
||||||
PACKAGE=$3
|
|
||||||
TMPFILE="mockgen_tmp.go"
|
|
||||||
# uppercase the name of the interface
|
|
||||||
ORIG_INTERFACE_NAME=$4
|
|
||||||
INTERFACE_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${ORIG_INTERFACE_NAME:0:1})${ORIG_INTERFACE_NAME:1}"
|
|
||||||
|
|
||||||
# Gather all files that contain interface definitions.
|
|
||||||
# These interfaces might be used as embedded interfaces,
|
|
||||||
# so we need to pass them to mockgen as aux_files.
|
|
||||||
AUX=()
|
|
||||||
for f in *.go; do
|
|
||||||
if [[ -z ${f##*_test.go} ]]; then
|
|
||||||
# skip test files
|
|
||||||
continue;
|
|
||||||
fi
|
|
||||||
if $(egrep -qe "type (.*) interface" $f); then
|
|
||||||
AUX+=("github.com/quic-go/quic-go=$f")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Find the file that defines the interface we're mocking.
|
|
||||||
for f in *.go; do
|
|
||||||
if [[ -z ${f##*_test.go} ]]; then
|
|
||||||
# skip test files
|
|
||||||
continue;
|
|
||||||
fi
|
|
||||||
INTERFACE=$(sed -n "/^type $ORIG_INTERFACE_NAME interface/,/^}/p" $f)
|
|
||||||
if [[ -n "$INTERFACE" ]]; then
|
|
||||||
SRC=$f
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z "$INTERFACE" ]]; then
|
|
||||||
echo "Interface $ORIG_INTERFACE_NAME not found."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
AUX_FILES=$(IFS=, ; echo "${AUX[*]}")
|
|
||||||
|
|
||||||
## create a public alias for the interface, so that mockgen can process it
|
|
||||||
echo -e "package $1\n" > $TMPFILE
|
|
||||||
echo "$INTERFACE" | sed "s/$ORIG_INTERFACE_NAME/$INTERFACE_NAME/" >> $TMPFILE
|
|
||||||
go run github.com/golang/mock/mockgen -package $1 -self_package $3 -destination $DEST -source=$TMPFILE -aux_files $AUX_FILES
|
|
||||||
sed "s/$TMPFILE/$SRC/" "$DEST" > "$DEST.new" && mv "$DEST.new" "$DEST"
|
|
||||||
rm "$TMPFILE"
|
|
|
@ -267,7 +267,7 @@ var _ = Describe("Server", func() {
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
tracer.EXPECT().TracerForConnection(gomock.Any(), protocol.PerspectiveServer, protocol.ParseConnectionID([]byte{0xde, 0xad, 0xc0, 0xde}))
|
tracer.EXPECT().TracerForConnection(gomock.Any(), protocol.PerspectiveServer, protocol.ParseConnectionID([]byte{0xde, 0xad, 0xc0, 0xde}))
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
serv.newConn = func(
|
serv.newConn = func(
|
||||||
_ sendConn,
|
_ sendConn,
|
||||||
_ connRunner,
|
_ connRunner,
|
||||||
|
@ -463,7 +463,7 @@ var _ = Describe("Server", func() {
|
||||||
})
|
})
|
||||||
tracer.EXPECT().TracerForConnection(gomock.Any(), protocol.PerspectiveServer, protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
tracer.EXPECT().TracerForConnection(gomock.Any(), protocol.PerspectiveServer, protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
||||||
|
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
serv.newConn = func(
|
serv.newConn = func(
|
||||||
_ sendConn,
|
_ sendConn,
|
||||||
_ connRunner,
|
_ connRunner,
|
||||||
|
@ -542,7 +542,7 @@ var _ = Describe("Server", func() {
|
||||||
) quicConn {
|
) quicConn {
|
||||||
<-acceptConn
|
<-acceptConn
|
||||||
atomic.AddUint32(&counter, 1)
|
atomic.AddUint32(&counter, 1)
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().handlePacket(gomock.Any()).MaxTimes(1)
|
conn.EXPECT().handlePacket(gomock.Any()).MaxTimes(1)
|
||||||
conn.EXPECT().run().MaxTimes(1)
|
conn.EXPECT().run().MaxTimes(1)
|
||||||
conn.EXPECT().Context().Return(context.Background()).MaxTimes(1)
|
conn.EXPECT().Context().Return(context.Background()).MaxTimes(1)
|
||||||
|
@ -574,7 +574,7 @@ var _ = Describe("Server", func() {
|
||||||
|
|
||||||
It("only creates a single connection for a duplicate Initial", func() {
|
It("only creates a single connection for a duplicate Initial", func() {
|
||||||
var createdConn bool
|
var createdConn bool
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
serv.newConn = func(
|
serv.newConn = func(
|
||||||
_ sendConn,
|
_ sendConn,
|
||||||
runner connRunner,
|
runner connRunner,
|
||||||
|
@ -622,7 +622,7 @@ var _ = Describe("Server", func() {
|
||||||
_ utils.Logger,
|
_ utils.Logger,
|
||||||
_ protocol.VersionNumber,
|
_ protocol.VersionNumber,
|
||||||
) quicConn {
|
) quicConn {
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().handlePacket(gomock.Any())
|
conn.EXPECT().handlePacket(gomock.Any())
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
conn.EXPECT().Context().Return(context.Background())
|
conn.EXPECT().Context().Return(context.Background())
|
||||||
|
@ -673,7 +673,7 @@ var _ = Describe("Server", func() {
|
||||||
p := getInitial(protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
p := getInitial(protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
connCreated := make(chan struct{})
|
connCreated := make(chan struct{})
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
serv.newConn = func(
|
serv.newConn = func(
|
||||||
_ sendConn,
|
_ sendConn,
|
||||||
runner connRunner,
|
runner connRunner,
|
||||||
|
@ -961,7 +961,7 @@ var _ = Describe("Server", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("accepts new connections when the handshake completes", func() {
|
It("accepts new connections when the handshake completes", func() {
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
|
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -1034,7 +1034,7 @@ var _ = Describe("Server", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("accepts new connections when they become ready", func() {
|
It("accepts new connections when they become ready", func() {
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
|
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -1107,7 +1107,7 @@ var _ = Describe("Server", func() {
|
||||||
) quicConn {
|
) quicConn {
|
||||||
ready := make(chan struct{})
|
ready := make(chan struct{})
|
||||||
close(ready)
|
close(ready)
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
conn.EXPECT().handlePacket(gomock.Any())
|
conn.EXPECT().handlePacket(gomock.Any())
|
||||||
conn.EXPECT().run()
|
conn.EXPECT().run()
|
||||||
conn.EXPECT().earlyConnReady().Return(ready)
|
conn.EXPECT().earlyConnReady().Return(ready)
|
||||||
|
@ -1148,7 +1148,7 @@ var _ = Describe("Server", func() {
|
||||||
p := getInitial(protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
p := getInitial(protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}))
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
connCreated := make(chan struct{})
|
connCreated := make(chan struct{})
|
||||||
conn := NewMockQuicConn(mockCtrl)
|
conn := NewMockQUICConn(mockCtrl)
|
||||||
serv.newConn = func(
|
serv.newConn = func(
|
||||||
_ sendConn,
|
_ sendConn,
|
||||||
runner connRunner,
|
runner connRunner,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue