mock_peer

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mock_peer is a generated GoMock package.

Package mock_peer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLogger added in v2.0.2

type MockLogger struct {
	// contains filtered or unexported fields
}

MockLogger is a mock of Logger interface.

func NewMockLogger added in v2.0.2

func NewMockLogger(ctrl *gomock.Controller) *MockLogger

NewMockLogger creates a new mock instance.

func (*MockLogger) EXPECT added in v2.0.2

func (m *MockLogger) EXPECT() *MockLoggerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogger) Log added in v2.0.2

Log mocks base method.

type MockLoggerMockRecorder added in v2.0.2

type MockLoggerMockRecorder struct {
	// contains filtered or unexported fields
}

MockLoggerMockRecorder is the mock recorder for MockLogger.

func (*MockLoggerMockRecorder) Log added in v2.0.2

func (mr *MockLoggerMockRecorder) Log() *gomock.Call

Log indicates an expected call of Log.

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 context.Context, arg1 *peer.DownloadPieceRequest) (io.Reader, io.Closer, error)

DownloadPiece mocks base method.

func (*MockPieceDownloader) EXPECT

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, arg1 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

func (m *MockTask) AddTraffic(arg0 uint64)

AddTraffic mocks base method.

func (*MockTask) Context

func (m *MockTask) Context() context.Context

Context 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

func (m *MockTask) GetContentLength() int64

GetContentLength mocks base method.

func (*MockTask) GetPeerID

func (m *MockTask) GetPeerID() string

GetPeerID mocks base method.

func (*MockTask) GetPieceMd5Sign added in v2.0.2

func (m *MockTask) GetPieceMd5Sign() string

GetPieceMd5Sign mocks base method.

func (*MockTask) GetStorage added in v2.0.2

func (m *MockTask) GetStorage() storage.TaskStorageDriver

GetStorage mocks base method.

func (*MockTask) GetTaskID

func (m *MockTask) GetTaskID() string

GetTaskID mocks base method.

func (*MockTask) GetTotalPieces

func (m *MockTask) GetTotalPieces() int32

GetTotalPieces mocks base method.

func (*MockTask) GetTraffic

func (m *MockTask) GetTraffic() uint64

GetTraffic mocks base method.

func (*MockTask) Log

Log mocks base method.

func (*MockTask) PublishPieceInfo added in v2.0.2

func (m *MockTask) PublishPieceInfo(pieceNum int32, size uint32)

PublishPieceInfo mocks base method.

func (*MockTask) ReportPieceResult

func (m *MockTask) ReportPieceResult(request *peer.DownloadPieceRequest, result *peer.DownloadPieceResult, err error)

ReportPieceResult mocks base method.

func (*MockTask) SetContentLength

func (m *MockTask) SetContentLength(arg0 int64)

SetContentLength mocks base method.

func (*MockTask) SetPieceMd5Sign added in v2.0.2

func (m *MockTask) SetPieceMd5Sign(arg0 string)

SetPieceMd5Sign mocks base method.

func (*MockTask) SetTotalPieces added in v2.0.2

func (m *MockTask) SetTotalPieces(arg0 int32)

SetTotalPieces mocks base method.

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTaskManager) IsPeerTaskRunning

func (m *MockTaskManager) IsPeerTaskRunning(id string) bool

IsPeerTaskRunning mocks base method.

func (*MockTaskManager) StartFileTask added in v2.0.2

func (m *MockTaskManager) StartFileTask(ctx context.Context, req *peer.FileTaskRequest) (chan *peer.FileTaskProgress, *peer.TinyData, error)

StartFileTask mocks base method.

func (*MockTaskManager) StartStreamTask added in v2.0.2

func (m *MockTaskManager) StartStreamTask(ctx context.Context, req *peer.StreamTaskRequest) (io.ReadCloser, map[string]string, error)

StartStreamTask mocks base method.

func (*MockTaskManager) Stop

func (m *MockTaskManager) Stop(ctx context.Context) error

Stop mocks base method.

func (*MockTaskManager) Subscribe added in v2.0.2

func (m *MockTaskManager) Subscribe(request *base.PieceTaskRequest) (*peer.SubscribeResult, bool)

Subscribe 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(id interface{}) *gomock.Call

IsPeerTaskRunning indicates an expected call of IsPeerTaskRunning.

func (*MockTaskManagerMockRecorder) StartFileTask added in v2.0.2

func (mr *MockTaskManagerMockRecorder) StartFileTask(ctx, req interface{}) *gomock.Call

StartFileTask indicates an expected call of StartFileTask.

func (*MockTaskManagerMockRecorder) StartStreamTask added in v2.0.2

func (mr *MockTaskManagerMockRecorder) StartStreamTask(ctx, req interface{}) *gomock.Call

StartStreamTask indicates an expected call of StartStreamTask.

func (*MockTaskManagerMockRecorder) Stop

func (mr *MockTaskManagerMockRecorder) Stop(ctx interface{}) *gomock.Call

Stop indicates an expected call of Stop.

func (*MockTaskManagerMockRecorder) Subscribe added in v2.0.2

func (mr *MockTaskManagerMockRecorder) Subscribe(request interface{}) *gomock.Call

Subscribe indicates an expected call of Subscribe.

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) GetPieceMd5Sign added in v2.0.2

func (mr *MockTaskMockRecorder) GetPieceMd5Sign() *gomock.Call

GetPieceMd5Sign indicates an expected call of GetPieceMd5Sign.

func (*MockTaskMockRecorder) GetStorage added in v2.0.2

func (mr *MockTaskMockRecorder) GetStorage() *gomock.Call

GetStorage indicates an expected call of GetStorage.

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) PublishPieceInfo added in v2.0.2

func (mr *MockTaskMockRecorder) PublishPieceInfo(pieceNum, size interface{}) *gomock.Call

PublishPieceInfo indicates an expected call of PublishPieceInfo.

func (*MockTaskMockRecorder) ReportPieceResult

func (mr *MockTaskMockRecorder) ReportPieceResult(request, result, err interface{}) *gomock.Call

ReportPieceResult indicates an expected call of ReportPieceResult.

func (*MockTaskMockRecorder) SetContentLength

func (mr *MockTaskMockRecorder) SetContentLength(arg0 interface{}) *gomock.Call

SetContentLength indicates an expected call of SetContentLength.

func (*MockTaskMockRecorder) SetPieceMd5Sign added in v2.0.2

func (mr *MockTaskMockRecorder) SetPieceMd5Sign(arg0 interface{}) *gomock.Call

SetPieceMd5Sign indicates an expected call of SetPieceMd5Sign.

func (*MockTaskMockRecorder) SetTotalPieces added in v2.0.2

func (mr *MockTaskMockRecorder) SetTotalPieces(arg0 interface{}) *gomock.Call

SetTotalPieces indicates an expected call of SetTotalPieces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL