mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
The queue holds all streams that have data to send. When stream.Write or stream.Close are called, a stream is added to this queue. It is removed from the queue when all available (at that moment) data was sent. This way, we don't need the round robin scheduling (which, for every packet sent, asked every single open stream if it had data) any more.
251 lines
8.9 KiB
Go
251 lines
8.9 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/lucas-clemente/quic-go (interfaces: StreamI)
|
|
|
|
// Package quic is a generated GoMock package.
|
|
package quic
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
time "time"
|
|
|
|
gomock "github.com/golang/mock/gomock"
|
|
protocol "github.com/lucas-clemente/quic-go/internal/protocol"
|
|
wire "github.com/lucas-clemente/quic-go/internal/wire"
|
|
)
|
|
|
|
// MockStreamI is a mock of StreamI interface
|
|
type MockStreamI struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockStreamIMockRecorder
|
|
}
|
|
|
|
// MockStreamIMockRecorder is the mock recorder for MockStreamI
|
|
type MockStreamIMockRecorder struct {
|
|
mock *MockStreamI
|
|
}
|
|
|
|
// NewMockStreamI creates a new mock instance
|
|
func NewMockStreamI(ctrl *gomock.Controller) *MockStreamI {
|
|
mock := &MockStreamI{ctrl: ctrl}
|
|
mock.recorder = &MockStreamIMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
func (m *MockStreamI) EXPECT() *MockStreamIMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// CancelRead mocks base method
|
|
func (m *MockStreamI) CancelRead(arg0 protocol.ApplicationErrorCode) error {
|
|
ret := m.ctrl.Call(m, "CancelRead", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// CancelRead indicates an expected call of CancelRead
|
|
func (mr *MockStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStreamI)(nil).CancelRead), arg0)
|
|
}
|
|
|
|
// CancelWrite mocks base method
|
|
func (m *MockStreamI) CancelWrite(arg0 protocol.ApplicationErrorCode) error {
|
|
ret := m.ctrl.Call(m, "CancelWrite", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// CancelWrite indicates an expected call of CancelWrite
|
|
func (mr *MockStreamIMockRecorder) CancelWrite(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStreamI)(nil).CancelWrite), arg0)
|
|
}
|
|
|
|
// Close mocks base method
|
|
func (m *MockStreamI) Close() error {
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close
|
|
func (mr *MockStreamIMockRecorder) Close() *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStreamI)(nil).Close))
|
|
}
|
|
|
|
// Context mocks base method
|
|
func (m *MockStreamI) Context() context.Context {
|
|
ret := m.ctrl.Call(m, "Context")
|
|
ret0, _ := ret[0].(context.Context)
|
|
return ret0
|
|
}
|
|
|
|
// Context indicates an expected call of Context
|
|
func (mr *MockStreamIMockRecorder) Context() *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStreamI)(nil).Context))
|
|
}
|
|
|
|
// Read mocks base method
|
|
func (m *MockStreamI) Read(arg0 []byte) (int, error) {
|
|
ret := m.ctrl.Call(m, "Read", arg0)
|
|
ret0, _ := ret[0].(int)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Read indicates an expected call of Read
|
|
func (mr *MockStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStreamI)(nil).Read), arg0)
|
|
}
|
|
|
|
// SetDeadline mocks base method
|
|
func (m *MockStreamI) SetDeadline(arg0 time.Time) error {
|
|
ret := m.ctrl.Call(m, "SetDeadline", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SetDeadline indicates an expected call of SetDeadline
|
|
func (mr *MockStreamIMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStreamI)(nil).SetDeadline), arg0)
|
|
}
|
|
|
|
// SetReadDeadline mocks base method
|
|
func (m *MockStreamI) SetReadDeadline(arg0 time.Time) error {
|
|
ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SetReadDeadline indicates an expected call of SetReadDeadline
|
|
func (mr *MockStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStreamI)(nil).SetReadDeadline), arg0)
|
|
}
|
|
|
|
// SetWriteDeadline mocks base method
|
|
func (m *MockStreamI) SetWriteDeadline(arg0 time.Time) error {
|
|
ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// SetWriteDeadline indicates an expected call of SetWriteDeadline
|
|
func (mr *MockStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStreamI)(nil).SetWriteDeadline), arg0)
|
|
}
|
|
|
|
// StreamID mocks base method
|
|
func (m *MockStreamI) StreamID() protocol.StreamID {
|
|
ret := m.ctrl.Call(m, "StreamID")
|
|
ret0, _ := ret[0].(protocol.StreamID)
|
|
return ret0
|
|
}
|
|
|
|
// StreamID indicates an expected call of StreamID
|
|
func (mr *MockStreamIMockRecorder) StreamID() *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStreamI)(nil).StreamID))
|
|
}
|
|
|
|
// Write mocks base method
|
|
func (m *MockStreamI) Write(arg0 []byte) (int, error) {
|
|
ret := m.ctrl.Call(m, "Write", arg0)
|
|
ret0, _ := ret[0].(int)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Write indicates an expected call of Write
|
|
func (mr *MockStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamI)(nil).Write), arg0)
|
|
}
|
|
|
|
// closeForShutdown mocks base method
|
|
func (m *MockStreamI) closeForShutdown(arg0 error) {
|
|
m.ctrl.Call(m, "closeForShutdown", arg0)
|
|
}
|
|
|
|
// closeForShutdown indicates an expected call of closeForShutdown
|
|
func (mr *MockStreamIMockRecorder) closeForShutdown(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockStreamI)(nil).closeForShutdown), arg0)
|
|
}
|
|
|
|
// finished mocks base method
|
|
func (m *MockStreamI) finished() bool {
|
|
ret := m.ctrl.Call(m, "finished")
|
|
ret0, _ := ret[0].(bool)
|
|
return ret0
|
|
}
|
|
|
|
// finished indicates an expected call of finished
|
|
func (mr *MockStreamIMockRecorder) finished() *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "finished", reflect.TypeOf((*MockStreamI)(nil).finished))
|
|
}
|
|
|
|
// getWindowUpdate mocks base method
|
|
func (m *MockStreamI) getWindowUpdate() protocol.ByteCount {
|
|
ret := m.ctrl.Call(m, "getWindowUpdate")
|
|
ret0, _ := ret[0].(protocol.ByteCount)
|
|
return ret0
|
|
}
|
|
|
|
// getWindowUpdate indicates an expected call of getWindowUpdate
|
|
func (mr *MockStreamIMockRecorder) getWindowUpdate() *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getWindowUpdate", reflect.TypeOf((*MockStreamI)(nil).getWindowUpdate))
|
|
}
|
|
|
|
// handleMaxStreamDataFrame mocks base method
|
|
func (m *MockStreamI) handleMaxStreamDataFrame(arg0 *wire.MaxStreamDataFrame) {
|
|
m.ctrl.Call(m, "handleMaxStreamDataFrame", arg0)
|
|
}
|
|
|
|
// handleMaxStreamDataFrame indicates an expected call of handleMaxStreamDataFrame
|
|
func (mr *MockStreamIMockRecorder) handleMaxStreamDataFrame(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleMaxStreamDataFrame", reflect.TypeOf((*MockStreamI)(nil).handleMaxStreamDataFrame), arg0)
|
|
}
|
|
|
|
// handleRstStreamFrame mocks base method
|
|
func (m *MockStreamI) handleRstStreamFrame(arg0 *wire.RstStreamFrame) error {
|
|
ret := m.ctrl.Call(m, "handleRstStreamFrame", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// handleRstStreamFrame indicates an expected call of handleRstStreamFrame
|
|
func (mr *MockStreamIMockRecorder) handleRstStreamFrame(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleRstStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleRstStreamFrame), arg0)
|
|
}
|
|
|
|
// handleStopSendingFrame mocks base method
|
|
func (m *MockStreamI) handleStopSendingFrame(arg0 *wire.StopSendingFrame) {
|
|
m.ctrl.Call(m, "handleStopSendingFrame", arg0)
|
|
}
|
|
|
|
// handleStopSendingFrame indicates an expected call of handleStopSendingFrame
|
|
func (mr *MockStreamIMockRecorder) handleStopSendingFrame(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStopSendingFrame", reflect.TypeOf((*MockStreamI)(nil).handleStopSendingFrame), arg0)
|
|
}
|
|
|
|
// handleStreamFrame mocks base method
|
|
func (m *MockStreamI) handleStreamFrame(arg0 *wire.StreamFrame) error {
|
|
ret := m.ctrl.Call(m, "handleStreamFrame", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// handleStreamFrame indicates an expected call of handleStreamFrame
|
|
func (mr *MockStreamIMockRecorder) handleStreamFrame(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleStreamFrame), arg0)
|
|
}
|
|
|
|
// popStreamFrame mocks base method
|
|
func (m *MockStreamI) popStreamFrame(arg0 protocol.ByteCount) (*wire.StreamFrame, bool) {
|
|
ret := m.ctrl.Call(m, "popStreamFrame", arg0)
|
|
ret0, _ := ret[0].(*wire.StreamFrame)
|
|
ret1, _ := ret[1].(bool)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// popStreamFrame indicates an expected call of popStreamFrame
|
|
func (mr *MockStreamIMockRecorder) popStreamFrame(arg0 interface{}) *gomock.Call {
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockStreamI)(nil).popStreamFrame), arg0)
|
|
}
|