Documentation ¶
Overview ¶
Package mock_peer is a generated GoMock package.
Package mock_peer is a generated GoMock package.
Index ¶
- type MockPieceDownloader
- type MockPieceDownloaderMockRecorder
- type MockTask
- func (m *MockTask) AddTraffic(arg0 int64)
- func (m *MockTask) Context() context.Context
- func (m *MockTask) EXPECT() *MockTaskMockRecorder
- func (m *MockTask) GetContentLength() int64
- func (m *MockTask) GetPeerID() string
- func (m *MockTask) GetTaskID() string
- func (m *MockTask) GetTotalPieces() int32
- func (m *MockTask) GetTraffic() int64
- func (m *MockTask) Log() *logger.SugaredLoggerOnWith
- func (m *MockTask) ReportPieceResult(pieceTask *base.PieceInfo, pieceResult *scheduler.PieceResult) error
- func (m *MockTask) SetCallback(arg0 peer.TaskCallback)
- func (m *MockTask) SetContentLength(arg0 int64) error
- type MockTaskCallback
- func (m *MockTaskCallback) Done(pt peer.Task) error
- func (m *MockTaskCallback) EXPECT() *MockTaskCallbackMockRecorder
- func (m *MockTaskCallback) Fail(pt peer.Task, code base.Code, reason string) error
- func (m *MockTaskCallback) GetStartTime() time.Time
- func (m *MockTaskCallback) Init(pt peer.Task) error
- func (m *MockTaskCallback) Update(pt peer.Task) error
- type MockTaskCallbackMockRecorder
- func (mr *MockTaskCallbackMockRecorder) Done(pt interface{}) *gomock.Call
- func (mr *MockTaskCallbackMockRecorder) Fail(pt, code, reason interface{}) *gomock.Call
- func (mr *MockTaskCallbackMockRecorder) GetStartTime() *gomock.Call
- func (mr *MockTaskCallbackMockRecorder) Init(pt interface{}) *gomock.Call
- func (mr *MockTaskCallbackMockRecorder) Update(pt interface{}) *gomock.Call
- type MockTaskManager
- func (m *MockTaskManager) EXPECT() *MockTaskManagerMockRecorder
- func (m *MockTaskManager) IsPeerTaskRunning(pid string) bool
- func (m *MockTaskManager) StartFilePeerTask(ctx context.Context, req *peer.FilePeerTaskRequest) (chan *peer.FilePeerTaskProgress, *peer.TinyData, error)
- func (m *MockTaskManager) StartStreamPeerTask(ctx context.Context, req *scheduler.PeerTaskRequest) (io.ReadCloser, map[string]string, error)
- func (m *MockTaskManager) Stop(ctx context.Context) error
- type MockTaskManagerMockRecorder
- func (mr *MockTaskManagerMockRecorder) IsPeerTaskRunning(pid interface{}) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) StartFilePeerTask(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) StartStreamPeerTask(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskManagerMockRecorder) Stop(ctx interface{}) *gomock.Call
- type MockTaskMockRecorder
- func (mr *MockTaskMockRecorder) AddTraffic(arg0 interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) Context() *gomock.Call
- func (mr *MockTaskMockRecorder) GetContentLength() *gomock.Call
- func (mr *MockTaskMockRecorder) GetPeerID() *gomock.Call
- func (mr *MockTaskMockRecorder) GetTaskID() *gomock.Call
- func (mr *MockTaskMockRecorder) GetTotalPieces() *gomock.Call
- func (mr *MockTaskMockRecorder) GetTraffic() *gomock.Call
- func (mr *MockTaskMockRecorder) Log() *gomock.Call
- func (mr *MockTaskMockRecorder) ReportPieceResult(pieceTask, pieceResult interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) SetCallback(arg0 interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) SetContentLength(arg0 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPieceDownloader ¶
type MockPieceDownloader struct {
// contains filtered or unexported fields
}
MockPieceDownloader is a mock of PieceDownloader interface
func NewMockPieceDownloader ¶
func NewMockPieceDownloader(ctrl *gomock.Controller) *MockPieceDownloader
NewMockPieceDownloader creates a new mock instance
func (*MockPieceDownloader) DownloadPiece ¶
func (m *MockPieceDownloader) DownloadPiece(arg0 *peer.DownloadPieceRequest) (io.ReadCloser, error)
DownloadPiece mocks base method
func (*MockPieceDownloader) EXPECT ¶
func (m *MockPieceDownloader) EXPECT() *MockPieceDownloaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockPieceDownloaderMockRecorder ¶
type MockPieceDownloaderMockRecorder struct {
// contains filtered or unexported fields
}
MockPieceDownloaderMockRecorder is the mock recorder for MockPieceDownloader
func (*MockPieceDownloaderMockRecorder) DownloadPiece ¶
func (mr *MockPieceDownloaderMockRecorder) DownloadPiece(arg0 interface{}) *gomock.Call
DownloadPiece indicates an expected call of DownloadPiece
type MockTask ¶
type MockTask struct {
// contains filtered or unexported fields
}
MockTask is a mock of Task interface.
func NewMockTask ¶
func NewMockTask(ctrl *gomock.Controller) *MockTask
NewMockTask creates a new mock instance.
func (*MockTask) AddTraffic ¶
AddTraffic mocks base method.
func (*MockTask) EXPECT ¶
func (m *MockTask) EXPECT() *MockTaskMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTask) GetContentLength ¶
GetContentLength mocks base method.
func (*MockTask) GetTotalPieces ¶
GetTotalPieces mocks base method.
func (*MockTask) ReportPieceResult ¶
func (m *MockTask) ReportPieceResult(pieceTask *base.PieceInfo, pieceResult *scheduler.PieceResult) error
ReportPieceResult mocks base method.
func (*MockTask) SetCallback ¶
func (m *MockTask) SetCallback(arg0 peer.TaskCallback)
SetCallback mocks base method.
func (*MockTask) SetContentLength ¶
SetContentLength mocks base method.
type MockTaskCallback ¶
type MockTaskCallback struct {
// contains filtered or unexported fields
}
MockTaskCallback is a mock of TaskCallback interface.
func NewMockTaskCallback ¶
func NewMockTaskCallback(ctrl *gomock.Controller) *MockTaskCallback
NewMockTaskCallback creates a new mock instance.
func (*MockTaskCallback) Done ¶
func (m *MockTaskCallback) Done(pt peer.Task) error
Done mocks base method.
func (*MockTaskCallback) EXPECT ¶
func (m *MockTaskCallback) EXPECT() *MockTaskCallbackMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskCallback) GetStartTime ¶
func (m *MockTaskCallback) GetStartTime() time.Time
GetStartTime mocks base method.
type MockTaskCallbackMockRecorder ¶
type MockTaskCallbackMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskCallbackMockRecorder is the mock recorder for MockTaskCallback.
func (*MockTaskCallbackMockRecorder) Done ¶
func (mr *MockTaskCallbackMockRecorder) Done(pt interface{}) *gomock.Call
Done indicates an expected call of Done.
func (*MockTaskCallbackMockRecorder) Fail ¶
func (mr *MockTaskCallbackMockRecorder) Fail(pt, code, reason interface{}) *gomock.Call
Fail indicates an expected call of Fail.
func (*MockTaskCallbackMockRecorder) GetStartTime ¶
func (mr *MockTaskCallbackMockRecorder) GetStartTime() *gomock.Call
GetStartTime indicates an expected call of GetStartTime.
func (*MockTaskCallbackMockRecorder) Init ¶
func (mr *MockTaskCallbackMockRecorder) Init(pt interface{}) *gomock.Call
Init indicates an expected call of Init.
func (*MockTaskCallbackMockRecorder) Update ¶
func (mr *MockTaskCallbackMockRecorder) Update(pt interface{}) *gomock.Call
Update indicates an expected call of Update.
type MockTaskManager ¶
type MockTaskManager struct {
// contains filtered or unexported fields
}
MockTaskManager is a mock of TaskManager interface.
func NewMockTaskManager ¶
func NewMockTaskManager(ctrl *gomock.Controller) *MockTaskManager
NewMockTaskManager creates a new mock instance.
func (*MockTaskManager) EXPECT ¶
func (m *MockTaskManager) EXPECT() *MockTaskManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskManager) IsPeerTaskRunning ¶
func (m *MockTaskManager) IsPeerTaskRunning(pid string) bool
IsPeerTaskRunning mocks base method.
func (*MockTaskManager) StartFilePeerTask ¶
func (m *MockTaskManager) StartFilePeerTask(ctx context.Context, req *peer.FilePeerTaskRequest) (chan *peer.FilePeerTaskProgress, *peer.TinyData, error)
StartFilePeerTask mocks base method.
func (*MockTaskManager) StartStreamPeerTask ¶
func (m *MockTaskManager) StartStreamPeerTask(ctx context.Context, req *scheduler.PeerTaskRequest) (io.ReadCloser, map[string]string, error)
StartStreamPeerTask mocks base method.
type MockTaskManagerMockRecorder ¶
type MockTaskManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskManagerMockRecorder is the mock recorder for MockTaskManager.
func (*MockTaskManagerMockRecorder) IsPeerTaskRunning ¶
func (mr *MockTaskManagerMockRecorder) IsPeerTaskRunning(pid interface{}) *gomock.Call
IsPeerTaskRunning indicates an expected call of IsPeerTaskRunning.
func (*MockTaskManagerMockRecorder) StartFilePeerTask ¶
func (mr *MockTaskManagerMockRecorder) StartFilePeerTask(ctx, req interface{}) *gomock.Call
StartFilePeerTask indicates an expected call of StartFilePeerTask.
func (*MockTaskManagerMockRecorder) StartStreamPeerTask ¶
func (mr *MockTaskManagerMockRecorder) StartStreamPeerTask(ctx, req interface{}) *gomock.Call
StartStreamPeerTask indicates an expected call of StartStreamPeerTask.
func (*MockTaskManagerMockRecorder) Stop ¶
func (mr *MockTaskManagerMockRecorder) Stop(ctx interface{}) *gomock.Call
Stop indicates an expected call of Stop.
type MockTaskMockRecorder ¶
type MockTaskMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskMockRecorder is the mock recorder for MockTask.
func (*MockTaskMockRecorder) AddTraffic ¶
func (mr *MockTaskMockRecorder) AddTraffic(arg0 interface{}) *gomock.Call
AddTraffic indicates an expected call of AddTraffic.
func (*MockTaskMockRecorder) Context ¶
func (mr *MockTaskMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
func (*MockTaskMockRecorder) GetContentLength ¶
func (mr *MockTaskMockRecorder) GetContentLength() *gomock.Call
GetContentLength indicates an expected call of GetContentLength.
func (*MockTaskMockRecorder) GetPeerID ¶
func (mr *MockTaskMockRecorder) GetPeerID() *gomock.Call
GetPeerID indicates an expected call of GetPeerID.
func (*MockTaskMockRecorder) GetTaskID ¶
func (mr *MockTaskMockRecorder) GetTaskID() *gomock.Call
GetTaskID indicates an expected call of GetTaskID.
func (*MockTaskMockRecorder) GetTotalPieces ¶
func (mr *MockTaskMockRecorder) GetTotalPieces() *gomock.Call
GetTotalPieces indicates an expected call of GetTotalPieces.
func (*MockTaskMockRecorder) GetTraffic ¶
func (mr *MockTaskMockRecorder) GetTraffic() *gomock.Call
GetTraffic indicates an expected call of GetTraffic.
func (*MockTaskMockRecorder) Log ¶
func (mr *MockTaskMockRecorder) Log() *gomock.Call
Log indicates an expected call of Log.
func (*MockTaskMockRecorder) ReportPieceResult ¶
func (mr *MockTaskMockRecorder) ReportPieceResult(pieceTask, pieceResult interface{}) *gomock.Call
ReportPieceResult indicates an expected call of ReportPieceResult.
func (*MockTaskMockRecorder) SetCallback ¶
func (mr *MockTaskMockRecorder) SetCallback(arg0 interface{}) *gomock.Call
SetCallback indicates an expected call of SetCallback.
func (*MockTaskMockRecorder) SetContentLength ¶
func (mr *MockTaskMockRecorder) SetContentLength(arg0 interface{}) *gomock.Call
SetContentLength indicates an expected call of SetContentLength.