265 lines
10 KiB
Go
265 lines
10 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: seed_peer_client.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -destination seed_peer_client_mock.go -source seed_peer_client.go -package resource
|
|
//
|
|
// Package resource is a generated GoMock package.
|
|
package resource
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
cdnsystem "d7y.io/api/v2/pkg/apis/cdnsystem/v1"
|
|
common "d7y.io/api/v2/pkg/apis/common/v1"
|
|
common0 "d7y.io/api/v2/pkg/apis/common/v2"
|
|
dfdaemon "d7y.io/api/v2/pkg/apis/dfdaemon/v2"
|
|
config "d7y.io/dragonfly/v2/scheduler/config"
|
|
gomock "go.uber.org/mock/gomock"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// MockSeedPeerClient is a mock of SeedPeerClient interface.
|
|
type MockSeedPeerClient struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockSeedPeerClientMockRecorder
|
|
}
|
|
|
|
// MockSeedPeerClientMockRecorder is the mock recorder for MockSeedPeerClient.
|
|
type MockSeedPeerClientMockRecorder struct {
|
|
mock *MockSeedPeerClient
|
|
}
|
|
|
|
// NewMockSeedPeerClient creates a new mock instance.
|
|
func NewMockSeedPeerClient(ctrl *gomock.Controller) *MockSeedPeerClient {
|
|
mock := &MockSeedPeerClient{ctrl: ctrl}
|
|
mock.recorder = &MockSeedPeerClientMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockSeedPeerClient) EXPECT() *MockSeedPeerClientMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Addrs mocks base method.
|
|
func (m *MockSeedPeerClient) Addrs() []string {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Addrs")
|
|
ret0, _ := ret[0].([]string)
|
|
return ret0
|
|
}
|
|
|
|
// Addrs indicates an expected call of Addrs.
|
|
func (mr *MockSeedPeerClientMockRecorder) Addrs() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addrs", reflect.TypeOf((*MockSeedPeerClient)(nil).Addrs))
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockSeedPeerClient) Close() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close.
|
|
func (mr *MockSeedPeerClientMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSeedPeerClient)(nil).Close))
|
|
}
|
|
|
|
// DeleteCacheTask mocks base method.
|
|
func (m *MockSeedPeerClient) DeleteCacheTask(arg0 context.Context, arg1 *dfdaemon.DeleteCacheTaskRequest, arg2 ...grpc.CallOption) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DeleteCacheTask", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// DeleteCacheTask indicates an expected call of DeleteCacheTask.
|
|
func (mr *MockSeedPeerClientMockRecorder) DeleteCacheTask(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockSeedPeerClient)(nil).DeleteCacheTask), varargs...)
|
|
}
|
|
|
|
// DownloadCacheTask mocks base method.
|
|
func (m *MockSeedPeerClient) DownloadCacheTask(arg0 context.Context, arg1 *dfdaemon.DownloadCacheTaskRequest, arg2 ...grpc.CallOption) (dfdaemon.DfdaemonUpload_DownloadCacheTaskClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DownloadCacheTask", varargs...)
|
|
ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_DownloadCacheTaskClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DownloadCacheTask indicates an expected call of DownloadCacheTask.
|
|
func (mr *MockSeedPeerClientMockRecorder) DownloadCacheTask(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCacheTask", reflect.TypeOf((*MockSeedPeerClient)(nil).DownloadCacheTask), varargs...)
|
|
}
|
|
|
|
// DownloadPiece mocks base method.
|
|
func (m *MockSeedPeerClient) DownloadPiece(arg0 context.Context, arg1 *dfdaemon.DownloadPieceRequest, arg2 ...grpc.CallOption) (*dfdaemon.DownloadPieceResponse, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DownloadPiece", varargs...)
|
|
ret0, _ := ret[0].(*dfdaemon.DownloadPieceResponse)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DownloadPiece indicates an expected call of DownloadPiece.
|
|
func (mr *MockSeedPeerClientMockRecorder) DownloadPiece(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPiece", reflect.TypeOf((*MockSeedPeerClient)(nil).DownloadPiece), varargs...)
|
|
}
|
|
|
|
// DownloadTask mocks base method.
|
|
func (m *MockSeedPeerClient) DownloadTask(arg0 context.Context, arg1 string, arg2 *dfdaemon.DownloadTaskRequest, arg3 ...grpc.CallOption) (dfdaemon.DfdaemonUpload_DownloadTaskClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DownloadTask", varargs...)
|
|
ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_DownloadTaskClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DownloadTask indicates an expected call of DownloadTask.
|
|
func (mr *MockSeedPeerClientMockRecorder) DownloadTask(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadTask", reflect.TypeOf((*MockSeedPeerClient)(nil).DownloadTask), varargs...)
|
|
}
|
|
|
|
// GetPieceTasks mocks base method.
|
|
func (m *MockSeedPeerClient) GetPieceTasks(arg0 context.Context, arg1 *common.PieceTaskRequest, arg2 ...grpc.CallOption) (*common.PiecePacket, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "GetPieceTasks", varargs...)
|
|
ret0, _ := ret[0].(*common.PiecePacket)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetPieceTasks indicates an expected call of GetPieceTasks.
|
|
func (mr *MockSeedPeerClientMockRecorder) GetPieceTasks(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPieceTasks", reflect.TypeOf((*MockSeedPeerClient)(nil).GetPieceTasks), varargs...)
|
|
}
|
|
|
|
// ObtainSeeds mocks base method.
|
|
func (m *MockSeedPeerClient) ObtainSeeds(arg0 context.Context, arg1 *cdnsystem.SeedRequest, arg2 ...grpc.CallOption) (cdnsystem.Seeder_ObtainSeedsClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ObtainSeeds", varargs...)
|
|
ret0, _ := ret[0].(cdnsystem.Seeder_ObtainSeedsClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ObtainSeeds indicates an expected call of ObtainSeeds.
|
|
func (mr *MockSeedPeerClientMockRecorder) ObtainSeeds(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObtainSeeds", reflect.TypeOf((*MockSeedPeerClient)(nil).ObtainSeeds), varargs...)
|
|
}
|
|
|
|
// OnNotify mocks base method.
|
|
func (m *MockSeedPeerClient) OnNotify(arg0 *config.DynconfigData) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "OnNotify", arg0)
|
|
}
|
|
|
|
// OnNotify indicates an expected call of OnNotify.
|
|
func (mr *MockSeedPeerClientMockRecorder) OnNotify(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnNotify", reflect.TypeOf((*MockSeedPeerClient)(nil).OnNotify), arg0)
|
|
}
|
|
|
|
// StatCacheTask mocks base method.
|
|
func (m *MockSeedPeerClient) StatCacheTask(arg0 context.Context, arg1 *dfdaemon.StatCacheTaskRequest, arg2 ...grpc.CallOption) (*common0.CacheTask, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "StatCacheTask", varargs...)
|
|
ret0, _ := ret[0].(*common0.CacheTask)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// StatCacheTask indicates an expected call of StatCacheTask.
|
|
func (mr *MockSeedPeerClientMockRecorder) StatCacheTask(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockSeedPeerClient)(nil).StatCacheTask), varargs...)
|
|
}
|
|
|
|
// SyncPieceTasks mocks base method.
|
|
func (m *MockSeedPeerClient) SyncPieceTasks(arg0 context.Context, arg1 *common.PieceTaskRequest, arg2 ...grpc.CallOption) (cdnsystem.Seeder_SyncPieceTasksClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "SyncPieceTasks", varargs...)
|
|
ret0, _ := ret[0].(cdnsystem.Seeder_SyncPieceTasksClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// SyncPieceTasks indicates an expected call of SyncPieceTasks.
|
|
func (mr *MockSeedPeerClientMockRecorder) SyncPieceTasks(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPieceTasks", reflect.TypeOf((*MockSeedPeerClient)(nil).SyncPieceTasks), varargs...)
|
|
}
|
|
|
|
// SyncPieces mocks base method.
|
|
func (m *MockSeedPeerClient) SyncPieces(arg0 context.Context, arg1 *dfdaemon.SyncPiecesRequest, arg2 ...grpc.CallOption) (dfdaemon.DfdaemonUpload_SyncPiecesClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "SyncPieces", varargs...)
|
|
ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_SyncPiecesClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// SyncPieces indicates an expected call of SyncPieces.
|
|
func (mr *MockSeedPeerClientMockRecorder) SyncPieces(arg0, arg1 any, arg2 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPieces", reflect.TypeOf((*MockSeedPeerClient)(nil).SyncPieces), varargs...)
|
|
}
|