Documentation ¶
Overview ¶
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Index ¶
- type MockCallback
- func (m *MockCallback) BeginOfPiece(arg0 context.Context, arg1 *resource.Peer)
- func (m *MockCallback) EXPECT() *MockCallbackMockRecorder
- func (m *MockCallback) EndOfPiece(arg0 context.Context, arg1 *resource.Peer)
- func (m *MockCallback) PeerFail(arg0 context.Context, arg1 *resource.Peer)
- func (m *MockCallback) PeerLeave(arg0 context.Context, arg1 *resource.Peer)
- func (m *MockCallback) PeerSuccess(arg0 context.Context, arg1 *resource.Peer)
- func (m *MockCallback) PieceFail(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
- func (m *MockCallback) PieceSuccess(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
- func (m *MockCallback) ScheduleParent(arg0 context.Context, arg1 *resource.Peer, arg2 set.SafeSet)
- func (m *MockCallback) TaskFail(arg0 context.Context, arg1 *resource.Task)
- func (m *MockCallback) TaskSuccess(arg0 context.Context, arg1 *resource.Task, arg2 *scheduler.PeerResult)
- type MockCallbackMockRecorder
- func (mr *MockCallbackMockRecorder) BeginOfPiece(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) EndOfPiece(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) PeerFail(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) PeerLeave(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) PeerSuccess(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) PieceFail(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) PieceSuccess(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) ScheduleParent(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) TaskFail(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockCallbackMockRecorder) TaskSuccess(arg0, arg1, arg2 interface{}) *gomock.Call
- type MockService
- func (m *MockService) CDN() resource.CDN
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) HandlePeer(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PeerResult)
- func (m *MockService) HandlePeerLeave(ctx context.Context, peer *resource.Peer)
- func (m *MockService) HandlePiece(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
- func (m *MockService) LoadOrStoreHost(arg0 context.Context, arg1 *scheduler.PeerTaskRequest) (*resource.Host, bool)
- func (m *MockService) LoadOrStorePeer(arg0 context.Context, arg1 *scheduler.PeerTaskRequest, arg2 *resource.Task, ...) (*resource.Peer, bool)
- func (m *MockService) LoadPeer(arg0 string) (*resource.Peer, bool)
- func (m *MockService) RegisterTask(arg0 context.Context, arg1 *scheduler.PeerTaskRequest) (*resource.Task, error)
- func (m *MockService) Scheduler() scheduler0.Scheduler
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) CDN() *gomock.Call
- func (mr *MockServiceMockRecorder) HandlePeer(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) HandlePeerLeave(ctx, peer interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) HandlePiece(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) LoadOrStoreHost(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) LoadOrStorePeer(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) LoadPeer(arg0 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) RegisterTask(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) Scheduler() *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCallback ¶
type MockCallback struct {
// contains filtered or unexported fields
}
MockCallback is a mock of Callback interface.
func NewMockCallback ¶
func NewMockCallback(ctrl *gomock.Controller) *MockCallback
NewMockCallback creates a new mock instance.
func (*MockCallback) BeginOfPiece ¶
func (m *MockCallback) BeginOfPiece(arg0 context.Context, arg1 *resource.Peer)
BeginOfPiece mocks base method.
func (*MockCallback) EXPECT ¶
func (m *MockCallback) EXPECT() *MockCallbackMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCallback) EndOfPiece ¶
func (m *MockCallback) EndOfPiece(arg0 context.Context, arg1 *resource.Peer)
EndOfPiece mocks base method.
func (*MockCallback) PeerFail ¶
func (m *MockCallback) PeerFail(arg0 context.Context, arg1 *resource.Peer)
PeerFail mocks base method.
func (*MockCallback) PeerLeave ¶
func (m *MockCallback) PeerLeave(arg0 context.Context, arg1 *resource.Peer)
PeerLeave mocks base method.
func (*MockCallback) PeerSuccess ¶
func (m *MockCallback) PeerSuccess(arg0 context.Context, arg1 *resource.Peer)
PeerSuccess mocks base method.
func (*MockCallback) PieceFail ¶
func (m *MockCallback) PieceFail(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
PieceFail mocks base method.
func (*MockCallback) PieceSuccess ¶
func (m *MockCallback) PieceSuccess(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
PieceSuccess mocks base method.
func (*MockCallback) ScheduleParent ¶
ScheduleParent mocks base method.
func (*MockCallback) TaskFail ¶
func (m *MockCallback) TaskFail(arg0 context.Context, arg1 *resource.Task)
TaskFail mocks base method.
func (*MockCallback) TaskSuccess ¶
func (m *MockCallback) TaskSuccess(arg0 context.Context, arg1 *resource.Task, arg2 *scheduler.PeerResult)
TaskSuccess mocks base method.
type MockCallbackMockRecorder ¶
type MockCallbackMockRecorder struct {
// contains filtered or unexported fields
}
MockCallbackMockRecorder is the mock recorder for MockCallback.
func (*MockCallbackMockRecorder) BeginOfPiece ¶
func (mr *MockCallbackMockRecorder) BeginOfPiece(arg0, arg1 interface{}) *gomock.Call
BeginOfPiece indicates an expected call of BeginOfPiece.
func (*MockCallbackMockRecorder) EndOfPiece ¶
func (mr *MockCallbackMockRecorder) EndOfPiece(arg0, arg1 interface{}) *gomock.Call
EndOfPiece indicates an expected call of EndOfPiece.
func (*MockCallbackMockRecorder) PeerFail ¶
func (mr *MockCallbackMockRecorder) PeerFail(arg0, arg1 interface{}) *gomock.Call
PeerFail indicates an expected call of PeerFail.
func (*MockCallbackMockRecorder) PeerLeave ¶
func (mr *MockCallbackMockRecorder) PeerLeave(arg0, arg1 interface{}) *gomock.Call
PeerLeave indicates an expected call of PeerLeave.
func (*MockCallbackMockRecorder) PeerSuccess ¶
func (mr *MockCallbackMockRecorder) PeerSuccess(arg0, arg1 interface{}) *gomock.Call
PeerSuccess indicates an expected call of PeerSuccess.
func (*MockCallbackMockRecorder) PieceFail ¶
func (mr *MockCallbackMockRecorder) PieceFail(arg0, arg1, arg2 interface{}) *gomock.Call
PieceFail indicates an expected call of PieceFail.
func (*MockCallbackMockRecorder) PieceSuccess ¶
func (mr *MockCallbackMockRecorder) PieceSuccess(arg0, arg1, arg2 interface{}) *gomock.Call
PieceSuccess indicates an expected call of PieceSuccess.
func (*MockCallbackMockRecorder) ScheduleParent ¶
func (mr *MockCallbackMockRecorder) ScheduleParent(arg0, arg1, arg2 interface{}) *gomock.Call
ScheduleParent indicates an expected call of ScheduleParent.
func (*MockCallbackMockRecorder) TaskFail ¶
func (mr *MockCallbackMockRecorder) TaskFail(arg0, arg1 interface{}) *gomock.Call
TaskFail indicates an expected call of TaskFail.
func (*MockCallbackMockRecorder) TaskSuccess ¶
func (mr *MockCallbackMockRecorder) TaskSuccess(arg0, arg1, arg2 interface{}) *gomock.Call
TaskSuccess indicates an expected call of TaskSuccess.
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) HandlePeer ¶
func (m *MockService) HandlePeer(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PeerResult)
HandlePeer mocks base method.
func (*MockService) HandlePeerLeave ¶
func (m *MockService) HandlePeerLeave(ctx context.Context, peer *resource.Peer)
HandlePeerLeave mocks base method.
func (*MockService) HandlePiece ¶
func (m *MockService) HandlePiece(arg0 context.Context, arg1 *resource.Peer, arg2 *scheduler.PieceResult)
HandlePiece mocks base method.
func (*MockService) LoadOrStoreHost ¶
func (m *MockService) LoadOrStoreHost(arg0 context.Context, arg1 *scheduler.PeerTaskRequest) (*resource.Host, bool)
LoadOrStoreHost mocks base method.
func (*MockService) LoadOrStorePeer ¶
func (m *MockService) LoadOrStorePeer(arg0 context.Context, arg1 *scheduler.PeerTaskRequest, arg2 *resource.Task, arg3 *resource.Host) (*resource.Peer, bool)
LoadOrStorePeer mocks base method.
func (*MockService) LoadPeer ¶
func (m *MockService) LoadPeer(arg0 string) (*resource.Peer, bool)
LoadPeer mocks base method.
func (*MockService) RegisterTask ¶
func (m *MockService) RegisterTask(arg0 context.Context, arg1 *scheduler.PeerTaskRequest) (*resource.Task, error)
RegisterTask mocks base method.
func (*MockService) Scheduler ¶
func (m *MockService) Scheduler() scheduler0.Scheduler
Scheduler mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) CDN ¶
func (mr *MockServiceMockRecorder) CDN() *gomock.Call
CDN indicates an expected call of CDN.
func (*MockServiceMockRecorder) HandlePeer ¶
func (mr *MockServiceMockRecorder) HandlePeer(arg0, arg1, arg2 interface{}) *gomock.Call
HandlePeer indicates an expected call of HandlePeer.
func (*MockServiceMockRecorder) HandlePeerLeave ¶
func (mr *MockServiceMockRecorder) HandlePeerLeave(ctx, peer interface{}) *gomock.Call
HandlePeerLeave indicates an expected call of HandlePeerLeave.
func (*MockServiceMockRecorder) HandlePiece ¶
func (mr *MockServiceMockRecorder) HandlePiece(arg0, arg1, arg2 interface{}) *gomock.Call
HandlePiece indicates an expected call of HandlePiece.
func (*MockServiceMockRecorder) LoadOrStoreHost ¶
func (mr *MockServiceMockRecorder) LoadOrStoreHost(arg0, arg1 interface{}) *gomock.Call
LoadOrStoreHost indicates an expected call of LoadOrStoreHost.
func (*MockServiceMockRecorder) LoadOrStorePeer ¶
func (mr *MockServiceMockRecorder) LoadOrStorePeer(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
LoadOrStorePeer indicates an expected call of LoadOrStorePeer.
func (*MockServiceMockRecorder) LoadPeer ¶
func (mr *MockServiceMockRecorder) LoadPeer(arg0 interface{}) *gomock.Call
LoadPeer indicates an expected call of LoadPeer.
func (*MockServiceMockRecorder) RegisterTask ¶
func (mr *MockServiceMockRecorder) RegisterTask(arg0, arg1 interface{}) *gomock.Call
RegisterTask indicates an expected call of RegisterTask.
func (*MockServiceMockRecorder) Scheduler ¶
func (mr *MockServiceMockRecorder) Scheduler() *gomock.Call
Scheduler indicates an expected call of Scheduler.