Documentation ¶
Overview ¶
Package mocks is a generated GoMock package.
Index ¶
- type MockManager
- func (m *MockManager) Alive(alive time.Duration) bool
- func (m *MockManager) CleanUp()
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) FindCompletedSubTask(taskID string) *storage.ReusePeerTask
- func (m *MockManager) FindCompletedTask(taskID string) *storage.ReusePeerTask
- func (m *MockManager) FindPartialCompletedTask(taskID string, rg *http.Range) *storage.ReusePeerTask
- func (m *MockManager) GetExtendAttribute(ctx context.Context, req *storage.PeerTaskMetadata) (*common.ExtendAttribute, error)
- func (m *MockManager) GetPieces(ctx context.Context, req *common.PieceTaskRequest) (*common.PiecePacket, error)
- func (m *MockManager) GetTotalPieces(ctx context.Context, req *storage.PeerTaskMetadata) (int32, error)
- func (m *MockManager) IsInvalid(req *storage.PeerTaskMetadata) (bool, error)
- func (m *MockManager) Keep()
- func (m *MockManager) ReadAllPieces(ctx context.Context, req *storage.ReadAllPiecesRequest) (io.ReadCloser, error)
- func (m *MockManager) ReadPiece(ctx context.Context, req *storage.ReadPieceRequest) (io.Reader, io.Closer, error)
- func (m *MockManager) RegisterSubTask(ctx context.Context, req *storage.RegisterSubTaskRequest) (storage.TaskStorageDriver, error)
- func (m *MockManager) RegisterTask(ctx context.Context, req *storage.RegisterTaskRequest) (storage.TaskStorageDriver, error)
- func (m *MockManager) Store(ctx context.Context, req *storage.StoreRequest) error
- func (m *MockManager) UnregisterTask(ctx context.Context, req storage.CommonTaskRequest) error
- func (m *MockManager) UpdateTask(ctx context.Context, req *storage.UpdateTaskRequest) error
- func (m *MockManager) ValidateDigest(req *storage.PeerTaskMetadata) error
- func (m *MockManager) WritePiece(ctx context.Context, req *storage.WritePieceRequest) (int64, error)
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) Alive(alive interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) CleanUp() *gomock.Call
- func (mr *MockManagerMockRecorder) FindCompletedSubTask(taskID interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) FindCompletedTask(taskID interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) FindPartialCompletedTask(taskID, rg interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetExtendAttribute(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetTotalPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) IsInvalid(req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Keep() *gomock.Call
- func (mr *MockManagerMockRecorder) ReadAllPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) ReadPiece(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) RegisterSubTask(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) RegisterTask(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Store(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) UnregisterTask(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateTask(ctx, req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) ValidateDigest(req interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) WritePiece(ctx, req interface{}) *gomock.Call
- type MockReclaimer
- type MockReclaimerMockRecorder
- type MockTaskStorageDriver
- func (m *MockTaskStorageDriver) EXPECT() *MockTaskStorageDriverMockRecorder
- func (m *MockTaskStorageDriver) GetExtendAttribute(ctx context.Context, req *storage.PeerTaskMetadata) (*common.ExtendAttribute, error)
- func (m *MockTaskStorageDriver) GetPieces(ctx context.Context, req *common.PieceTaskRequest) (*common.PiecePacket, error)
- func (m *MockTaskStorageDriver) GetTotalPieces(ctx context.Context, req *storage.PeerTaskMetadata) (int32, error)
- func (m *MockTaskStorageDriver) IsInvalid(req *storage.PeerTaskMetadata) (bool, error)
- func (m *MockTaskStorageDriver) ReadAllPieces(ctx context.Context, req *storage.ReadAllPiecesRequest) (io.ReadCloser, error)
- func (m *MockTaskStorageDriver) ReadPiece(ctx context.Context, req *storage.ReadPieceRequest) (io.Reader, io.Closer, error)
- func (m *MockTaskStorageDriver) Store(ctx context.Context, req *storage.StoreRequest) error
- func (m *MockTaskStorageDriver) UpdateTask(ctx context.Context, req *storage.UpdateTaskRequest) error
- func (m *MockTaskStorageDriver) ValidateDigest(req *storage.PeerTaskMetadata) error
- func (m *MockTaskStorageDriver) WritePiece(ctx context.Context, req *storage.WritePieceRequest) (int64, error)
- type MockTaskStorageDriverMockRecorder
- func (mr *MockTaskStorageDriverMockRecorder) GetExtendAttribute(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) GetPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) GetTotalPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) IsInvalid(req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) ReadAllPieces(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) ReadPiece(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) Store(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) UpdateTask(ctx, req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) ValidateDigest(req interface{}) *gomock.Call
- func (mr *MockTaskStorageDriverMockRecorder) WritePiece(ctx, req interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) Alive ¶
func (m *MockManager) Alive(alive time.Duration) bool
Alive mocks base method.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) FindCompletedSubTask ¶
func (m *MockManager) FindCompletedSubTask(taskID string) *storage.ReusePeerTask
FindCompletedSubTask mocks base method.
func (*MockManager) FindCompletedTask ¶
func (m *MockManager) FindCompletedTask(taskID string) *storage.ReusePeerTask
FindCompletedTask mocks base method.
func (*MockManager) FindPartialCompletedTask ¶
func (m *MockManager) FindPartialCompletedTask(taskID string, rg *http.Range) *storage.ReusePeerTask
FindPartialCompletedTask mocks base method.
func (*MockManager) GetExtendAttribute ¶
func (m *MockManager) GetExtendAttribute(ctx context.Context, req *storage.PeerTaskMetadata) (*common.ExtendAttribute, error)
GetExtendAttribute mocks base method.
func (*MockManager) GetPieces ¶
func (m *MockManager) GetPieces(ctx context.Context, req *common.PieceTaskRequest) (*common.PiecePacket, error)
GetPieces mocks base method.
func (*MockManager) GetTotalPieces ¶
func (m *MockManager) GetTotalPieces(ctx context.Context, req *storage.PeerTaskMetadata) (int32, error)
GetTotalPieces mocks base method.
func (*MockManager) IsInvalid ¶
func (m *MockManager) IsInvalid(req *storage.PeerTaskMetadata) (bool, error)
IsInvalid mocks base method.
func (*MockManager) ReadAllPieces ¶
func (m *MockManager) ReadAllPieces(ctx context.Context, req *storage.ReadAllPiecesRequest) (io.ReadCloser, error)
ReadAllPieces mocks base method.
func (*MockManager) ReadPiece ¶
func (m *MockManager) ReadPiece(ctx context.Context, req *storage.ReadPieceRequest) (io.Reader, io.Closer, error)
ReadPiece mocks base method.
func (*MockManager) RegisterSubTask ¶
func (m *MockManager) RegisterSubTask(ctx context.Context, req *storage.RegisterSubTaskRequest) (storage.TaskStorageDriver, error)
RegisterSubTask mocks base method.
func (*MockManager) RegisterTask ¶
func (m *MockManager) RegisterTask(ctx context.Context, req *storage.RegisterTaskRequest) (storage.TaskStorageDriver, error)
RegisterTask mocks base method.
func (*MockManager) Store ¶
func (m *MockManager) Store(ctx context.Context, req *storage.StoreRequest) error
Store mocks base method.
func (*MockManager) UnregisterTask ¶
func (m *MockManager) UnregisterTask(ctx context.Context, req storage.CommonTaskRequest) error
UnregisterTask mocks base method.
func (*MockManager) UpdateTask ¶
func (m *MockManager) UpdateTask(ctx context.Context, req *storage.UpdateTaskRequest) error
UpdateTask mocks base method.
func (*MockManager) ValidateDigest ¶
func (m *MockManager) ValidateDigest(req *storage.PeerTaskMetadata) error
ValidateDigest mocks base method.
func (*MockManager) WritePiece ¶
func (m *MockManager) WritePiece(ctx context.Context, req *storage.WritePieceRequest) (int64, error)
WritePiece mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) Alive ¶
func (mr *MockManagerMockRecorder) Alive(alive interface{}) *gomock.Call
Alive indicates an expected call of Alive.
func (*MockManagerMockRecorder) CleanUp ¶
func (mr *MockManagerMockRecorder) CleanUp() *gomock.Call
CleanUp indicates an expected call of CleanUp.
func (*MockManagerMockRecorder) FindCompletedSubTask ¶
func (mr *MockManagerMockRecorder) FindCompletedSubTask(taskID interface{}) *gomock.Call
FindCompletedSubTask indicates an expected call of FindCompletedSubTask.
func (*MockManagerMockRecorder) FindCompletedTask ¶
func (mr *MockManagerMockRecorder) FindCompletedTask(taskID interface{}) *gomock.Call
FindCompletedTask indicates an expected call of FindCompletedTask.
func (*MockManagerMockRecorder) FindPartialCompletedTask ¶
func (mr *MockManagerMockRecorder) FindPartialCompletedTask(taskID, rg interface{}) *gomock.Call
FindPartialCompletedTask indicates an expected call of FindPartialCompletedTask.
func (*MockManagerMockRecorder) GetExtendAttribute ¶
func (mr *MockManagerMockRecorder) GetExtendAttribute(ctx, req interface{}) *gomock.Call
GetExtendAttribute indicates an expected call of GetExtendAttribute.
func (*MockManagerMockRecorder) GetPieces ¶
func (mr *MockManagerMockRecorder) GetPieces(ctx, req interface{}) *gomock.Call
GetPieces indicates an expected call of GetPieces.
func (*MockManagerMockRecorder) GetTotalPieces ¶
func (mr *MockManagerMockRecorder) GetTotalPieces(ctx, req interface{}) *gomock.Call
GetTotalPieces indicates an expected call of GetTotalPieces.
func (*MockManagerMockRecorder) IsInvalid ¶
func (mr *MockManagerMockRecorder) IsInvalid(req interface{}) *gomock.Call
IsInvalid indicates an expected call of IsInvalid.
func (*MockManagerMockRecorder) Keep ¶
func (mr *MockManagerMockRecorder) Keep() *gomock.Call
Keep indicates an expected call of Keep.
func (*MockManagerMockRecorder) ReadAllPieces ¶
func (mr *MockManagerMockRecorder) ReadAllPieces(ctx, req interface{}) *gomock.Call
ReadAllPieces indicates an expected call of ReadAllPieces.
func (*MockManagerMockRecorder) ReadPiece ¶
func (mr *MockManagerMockRecorder) ReadPiece(ctx, req interface{}) *gomock.Call
ReadPiece indicates an expected call of ReadPiece.
func (*MockManagerMockRecorder) RegisterSubTask ¶
func (mr *MockManagerMockRecorder) RegisterSubTask(ctx, req interface{}) *gomock.Call
RegisterSubTask indicates an expected call of RegisterSubTask.
func (*MockManagerMockRecorder) RegisterTask ¶
func (mr *MockManagerMockRecorder) RegisterTask(ctx, req interface{}) *gomock.Call
RegisterTask indicates an expected call of RegisterTask.
func (*MockManagerMockRecorder) Store ¶
func (mr *MockManagerMockRecorder) Store(ctx, req interface{}) *gomock.Call
Store indicates an expected call of Store.
func (*MockManagerMockRecorder) UnregisterTask ¶
func (mr *MockManagerMockRecorder) UnregisterTask(ctx, req interface{}) *gomock.Call
UnregisterTask indicates an expected call of UnregisterTask.
func (*MockManagerMockRecorder) UpdateTask ¶
func (mr *MockManagerMockRecorder) UpdateTask(ctx, req interface{}) *gomock.Call
UpdateTask indicates an expected call of UpdateTask.
func (*MockManagerMockRecorder) ValidateDigest ¶
func (mr *MockManagerMockRecorder) ValidateDigest(req interface{}) *gomock.Call
ValidateDigest indicates an expected call of ValidateDigest.
func (*MockManagerMockRecorder) WritePiece ¶
func (mr *MockManagerMockRecorder) WritePiece(ctx, req interface{}) *gomock.Call
WritePiece indicates an expected call of WritePiece.
type MockReclaimer ¶
type MockReclaimer struct {
// contains filtered or unexported fields
}
MockReclaimer is a mock of Reclaimer interface.
func NewMockReclaimer ¶
func NewMockReclaimer(ctrl *gomock.Controller) *MockReclaimer
NewMockReclaimer creates a new mock instance.
func (*MockReclaimer) CanReclaim ¶
func (m *MockReclaimer) CanReclaim() bool
CanReclaim mocks base method.
func (*MockReclaimer) EXPECT ¶
func (m *MockReclaimer) EXPECT() *MockReclaimerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReclaimer) MarkInvalid ¶ added in v2.0.7
func (m *MockReclaimer) MarkInvalid()
MarkInvalid mocks base method.
func (*MockReclaimer) MarkReclaim ¶
func (m *MockReclaimer) MarkReclaim()
MarkReclaim mocks base method.
type MockReclaimerMockRecorder ¶
type MockReclaimerMockRecorder struct {
// contains filtered or unexported fields
}
MockReclaimerMockRecorder is the mock recorder for MockReclaimer.
func (*MockReclaimerMockRecorder) CanReclaim ¶
func (mr *MockReclaimerMockRecorder) CanReclaim() *gomock.Call
CanReclaim indicates an expected call of CanReclaim.
func (*MockReclaimerMockRecorder) MarkInvalid ¶ added in v2.0.7
func (mr *MockReclaimerMockRecorder) MarkInvalid() *gomock.Call
MarkInvalid indicates an expected call of MarkInvalid.
func (*MockReclaimerMockRecorder) MarkReclaim ¶
func (mr *MockReclaimerMockRecorder) MarkReclaim() *gomock.Call
MarkReclaim indicates an expected call of MarkReclaim.
func (*MockReclaimerMockRecorder) Reclaim ¶
func (mr *MockReclaimerMockRecorder) Reclaim() *gomock.Call
Reclaim indicates an expected call of Reclaim.
type MockTaskStorageDriver ¶
type MockTaskStorageDriver struct {
// contains filtered or unexported fields
}
MockTaskStorageDriver is a mock of TaskStorageDriver interface.
func NewMockTaskStorageDriver ¶
func NewMockTaskStorageDriver(ctrl *gomock.Controller) *MockTaskStorageDriver
NewMockTaskStorageDriver creates a new mock instance.
func (*MockTaskStorageDriver) EXPECT ¶
func (m *MockTaskStorageDriver) EXPECT() *MockTaskStorageDriverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskStorageDriver) GetExtendAttribute ¶
func (m *MockTaskStorageDriver) GetExtendAttribute(ctx context.Context, req *storage.PeerTaskMetadata) (*common.ExtendAttribute, error)
GetExtendAttribute mocks base method.
func (*MockTaskStorageDriver) GetPieces ¶
func (m *MockTaskStorageDriver) GetPieces(ctx context.Context, req *common.PieceTaskRequest) (*common.PiecePacket, error)
GetPieces mocks base method.
func (*MockTaskStorageDriver) GetTotalPieces ¶
func (m *MockTaskStorageDriver) GetTotalPieces(ctx context.Context, req *storage.PeerTaskMetadata) (int32, error)
GetTotalPieces mocks base method.
func (*MockTaskStorageDriver) IsInvalid ¶
func (m *MockTaskStorageDriver) IsInvalid(req *storage.PeerTaskMetadata) (bool, error)
IsInvalid mocks base method.
func (*MockTaskStorageDriver) ReadAllPieces ¶
func (m *MockTaskStorageDriver) ReadAllPieces(ctx context.Context, req *storage.ReadAllPiecesRequest) (io.ReadCloser, error)
ReadAllPieces mocks base method.
func (*MockTaskStorageDriver) ReadPiece ¶
func (m *MockTaskStorageDriver) ReadPiece(ctx context.Context, req *storage.ReadPieceRequest) (io.Reader, io.Closer, error)
ReadPiece mocks base method.
func (*MockTaskStorageDriver) Store ¶
func (m *MockTaskStorageDriver) Store(ctx context.Context, req *storage.StoreRequest) error
Store mocks base method.
func (*MockTaskStorageDriver) UpdateTask ¶
func (m *MockTaskStorageDriver) UpdateTask(ctx context.Context, req *storage.UpdateTaskRequest) error
UpdateTask mocks base method.
func (*MockTaskStorageDriver) ValidateDigest ¶
func (m *MockTaskStorageDriver) ValidateDigest(req *storage.PeerTaskMetadata) error
ValidateDigest mocks base method.
func (*MockTaskStorageDriver) WritePiece ¶
func (m *MockTaskStorageDriver) WritePiece(ctx context.Context, req *storage.WritePieceRequest) (int64, error)
WritePiece mocks base method.
type MockTaskStorageDriverMockRecorder ¶
type MockTaskStorageDriverMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskStorageDriverMockRecorder is the mock recorder for MockTaskStorageDriver.
func (*MockTaskStorageDriverMockRecorder) GetExtendAttribute ¶
func (mr *MockTaskStorageDriverMockRecorder) GetExtendAttribute(ctx, req interface{}) *gomock.Call
GetExtendAttribute indicates an expected call of GetExtendAttribute.
func (*MockTaskStorageDriverMockRecorder) GetPieces ¶
func (mr *MockTaskStorageDriverMockRecorder) GetPieces(ctx, req interface{}) *gomock.Call
GetPieces indicates an expected call of GetPieces.
func (*MockTaskStorageDriverMockRecorder) GetTotalPieces ¶
func (mr *MockTaskStorageDriverMockRecorder) GetTotalPieces(ctx, req interface{}) *gomock.Call
GetTotalPieces indicates an expected call of GetTotalPieces.
func (*MockTaskStorageDriverMockRecorder) IsInvalid ¶
func (mr *MockTaskStorageDriverMockRecorder) IsInvalid(req interface{}) *gomock.Call
IsInvalid indicates an expected call of IsInvalid.
func (*MockTaskStorageDriverMockRecorder) ReadAllPieces ¶
func (mr *MockTaskStorageDriverMockRecorder) ReadAllPieces(ctx, req interface{}) *gomock.Call
ReadAllPieces indicates an expected call of ReadAllPieces.
func (*MockTaskStorageDriverMockRecorder) ReadPiece ¶
func (mr *MockTaskStorageDriverMockRecorder) ReadPiece(ctx, req interface{}) *gomock.Call
ReadPiece indicates an expected call of ReadPiece.
func (*MockTaskStorageDriverMockRecorder) Store ¶
func (mr *MockTaskStorageDriverMockRecorder) Store(ctx, req interface{}) *gomock.Call
Store indicates an expected call of Store.
func (*MockTaskStorageDriverMockRecorder) UpdateTask ¶
func (mr *MockTaskStorageDriverMockRecorder) UpdateTask(ctx, req interface{}) *gomock.Call
UpdateTask indicates an expected call of UpdateTask.
func (*MockTaskStorageDriverMockRecorder) ValidateDigest ¶
func (mr *MockTaskStorageDriverMockRecorder) ValidateDigest(req interface{}) *gomock.Call
ValidateDigest indicates an expected call of ValidateDigest.
func (*MockTaskStorageDriverMockRecorder) WritePiece ¶
func (mr *MockTaskStorageDriverMockRecorder) WritePiece(ctx, req interface{}) *gomock.Call
WritePiece indicates an expected call of WritePiece.