From 0b031ea044a44bfc537777aee6661b15f6777064 Mon Sep 17 00:00:00 2001 From: Gaius Date: Thu, 26 Sep 2024 16:42:29 +0800 Subject: [PATCH] feat: generate mocks (#395) Signed-off-by: Gaius --- Cargo.lock | 2 +- Cargo.toml | 2 +- pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go | 490 ++++++++-------- pkg/apis/scheduler/v2/mocks/scheduler_mock.go | 534 +++++++++--------- 4 files changed, 514 insertions(+), 514 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4de8af8..9817902 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,7 @@ dependencies = [ [[package]] name = "dragonfly-api" -version = "2.0.161" +version = "2.0.162" dependencies = [ "prost", "prost-types", diff --git a/Cargo.toml b/Cargo.toml index 7721327..1f964cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dragonfly-api" -version = "2.0.161" +version = "2.0.162" authors = ["Gaius "] edition = "2021" license = "Apache-2.0" diff --git a/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go b/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go index cb6c2c3..3b75200 100644 --- a/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go +++ b/pkg/apis/dfdaemon/v2/mocks/dfdaemon_mock.go @@ -44,24 +44,24 @@ func (m *MockDfdaemonUploadClient) EXPECT() *MockDfdaemonUploadClientMockRecorde return m.recorder } -// DeleteCacheTask mocks base method. -func (m *MockDfdaemonUploadClient) DeleteCacheTask(ctx context.Context, in *dfdaemon.DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +// DeletePersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadClient) DeletePersistentCacheTask(ctx context.Context, in *dfdaemon.DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "DeleteCacheTask", varargs...) + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", varargs...) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockDfdaemonUploadClientMockRecorder) DeleteCacheTask(ctx, in any, opts ...any) *gomock.Call { +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockDfdaemonUploadClientMockRecorder) DeletePersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DeleteCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DeletePersistentCacheTask), varargs...) } // DeleteTask mocks base method. @@ -84,24 +84,24 @@ func (mr *MockDfdaemonUploadClientMockRecorder) DeleteTask(ctx, in any, opts ... return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DeleteTask), varargs...) } -// DownloadCacheTask mocks base method. -func (m *MockDfdaemonUploadClient) DownloadCacheTask(ctx context.Context, in *dfdaemon.DownloadCacheTaskRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonUpload_DownloadCacheTaskClient, error) { +// DownloadPersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadClient) DownloadPersistentCacheTask(ctx context.Context, in *dfdaemon.DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonUpload_DownloadPersistentCacheTaskClient, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "DownloadCacheTask", varargs...) - ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_DownloadCacheTaskClient) + ret := m.ctrl.Call(m, "DownloadPersistentCacheTask", varargs...) + ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_DownloadPersistentCacheTaskClient) ret1, _ := ret[1].(error) return ret0, ret1 } -// DownloadCacheTask indicates an expected call of DownloadCacheTask. -func (mr *MockDfdaemonUploadClientMockRecorder) DownloadCacheTask(ctx, in any, opts ...any) *gomock.Call { +// DownloadPersistentCacheTask indicates an expected call of DownloadPersistentCacheTask. +func (mr *MockDfdaemonUploadClientMockRecorder) DownloadPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DownloadCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DownloadPersistentCacheTask), varargs...) } // DownloadPiece mocks base method. @@ -144,24 +144,24 @@ func (mr *MockDfdaemonUploadClientMockRecorder) DownloadTask(ctx, in any, opts . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).DownloadTask), varargs...) } -// StatCacheTask mocks base method. -func (m *MockDfdaemonUploadClient) StatCacheTask(ctx context.Context, in *dfdaemon.StatCacheTaskRequest, opts ...grpc.CallOption) (*common.CacheTask, error) { +// StatPersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadClient) StatPersistentCacheTask(ctx context.Context, in *dfdaemon.StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "StatCacheTask", varargs...) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "StatPersistentCacheTask", varargs...) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockDfdaemonUploadClientMockRecorder) StatCacheTask(ctx, in any, opts ...any) *gomock.Call { +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockDfdaemonUploadClientMockRecorder) StatPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).StatCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadClient)(nil).StatPersistentCacheTask), varargs...) } // StatTask mocks base method. @@ -450,31 +450,31 @@ func (mr *MockDfdaemonUpload_SyncPiecesClientMockRecorder) Trailer() *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonUpload_SyncPiecesClient)(nil).Trailer)) } -// MockDfdaemonUpload_DownloadCacheTaskClient is a mock of DfdaemonUpload_DownloadCacheTaskClient interface. -type MockDfdaemonUpload_DownloadCacheTaskClient struct { +// MockDfdaemonUpload_DownloadPersistentCacheTaskClient is a mock of DfdaemonUpload_DownloadPersistentCacheTaskClient interface. +type MockDfdaemonUpload_DownloadPersistentCacheTaskClient struct { ctrl *gomock.Controller - recorder *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder + recorder *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder } -// MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder is the mock recorder for MockDfdaemonUpload_DownloadCacheTaskClient. -type MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder struct { - mock *MockDfdaemonUpload_DownloadCacheTaskClient +// MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder is the mock recorder for MockDfdaemonUpload_DownloadPersistentCacheTaskClient. +type MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder struct { + mock *MockDfdaemonUpload_DownloadPersistentCacheTaskClient } -// NewMockDfdaemonUpload_DownloadCacheTaskClient creates a new mock instance. -func NewMockDfdaemonUpload_DownloadCacheTaskClient(ctrl *gomock.Controller) *MockDfdaemonUpload_DownloadCacheTaskClient { - mock := &MockDfdaemonUpload_DownloadCacheTaskClient{ctrl: ctrl} - mock.recorder = &MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder{mock} +// NewMockDfdaemonUpload_DownloadPersistentCacheTaskClient creates a new mock instance. +func NewMockDfdaemonUpload_DownloadPersistentCacheTaskClient(ctrl *gomock.Controller) *MockDfdaemonUpload_DownloadPersistentCacheTaskClient { + mock := &MockDfdaemonUpload_DownloadPersistentCacheTaskClient{ctrl: ctrl} + mock.recorder = &MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) EXPECT() *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) EXPECT() *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder { return m.recorder } // CloseSend mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) CloseSend() error { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) CloseSend() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CloseSend") ret0, _ := ret[0].(error) @@ -482,13 +482,13 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskClient) CloseSend() error { } // CloseSend indicates an expected call of CloseSend. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) CloseSend() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) CloseSend() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).CloseSend)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).CloseSend)) } // Context mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Context() context.Context { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -496,13 +496,13 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Context() context.Context { } // Context indicates an expected call of Context. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) Context() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).Context)) } // Header mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Header() (metadata.MD, error) { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) Header() (metadata.MD, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Header") ret0, _ := ret[0].(metadata.MD) @@ -511,28 +511,28 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Header() (metadata.MD, erro } // Header indicates an expected call of Header. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) Header() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) Header() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).Header)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).Header)) } // Recv mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Recv() (*dfdaemon.DownloadCacheTaskResponse, error) { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) Recv() (*dfdaemon.DownloadPersistentCacheTaskResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*dfdaemon.DownloadCacheTaskResponse) + ret0, _ := ret[0].(*dfdaemon.DownloadPersistentCacheTaskResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // Recv indicates an expected call of Recv. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) Recv() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) Recv() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).Recv)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).Recv)) } // RecvMsg mocks base method. -func (m_2 *MockDfdaemonUpload_DownloadCacheTaskClient) RecvMsg(m any) error { +func (m_2 *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -540,13 +540,13 @@ func (m_2 *MockDfdaemonUpload_DownloadCacheTaskClient) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).RecvMsg), m) } // SendMsg mocks base method. -func (m_2 *MockDfdaemonUpload_DownloadCacheTaskClient) SendMsg(m any) error { +func (m_2 *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -554,13 +554,13 @@ func (m_2 *MockDfdaemonUpload_DownloadCacheTaskClient) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).SendMsg), m) } // Trailer mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Trailer() metadata.MD { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskClient) Trailer() metadata.MD { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Trailer") ret0, _ := ret[0].(metadata.MD) @@ -568,9 +568,9 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskClient) Trailer() metadata.MD { } // Trailer indicates an expected call of Trailer. -func (mr *MockDfdaemonUpload_DownloadCacheTaskClientMockRecorder) Trailer() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskClientMockRecorder) Trailer() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskClient)(nil).Trailer)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskClient)(nil).Trailer)) } // MockDfdaemonUploadServer is a mock of DfdaemonUploadServer interface. @@ -596,19 +596,19 @@ func (m *MockDfdaemonUploadServer) EXPECT() *MockDfdaemonUploadServerMockRecorde return m.recorder } -// DeleteCacheTask mocks base method. -func (m *MockDfdaemonUploadServer) DeleteCacheTask(arg0 context.Context, arg1 *dfdaemon.DeleteCacheTaskRequest) (*emptypb.Empty, error) { +// DeletePersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadServer) DeletePersistentCacheTask(arg0 context.Context, arg1 *dfdaemon.DeletePersistentCacheTaskRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteCacheTask", arg0, arg1) + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", arg0, arg1) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockDfdaemonUploadServerMockRecorder) DeleteCacheTask(arg0, arg1 any) *gomock.Call { +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockDfdaemonUploadServerMockRecorder) DeletePersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DeleteCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DeletePersistentCacheTask), arg0, arg1) } // DeleteTask mocks base method. @@ -626,18 +626,18 @@ func (mr *MockDfdaemonUploadServerMockRecorder) DeleteTask(arg0, arg1 any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DeleteTask), arg0, arg1) } -// DownloadCacheTask mocks base method. -func (m *MockDfdaemonUploadServer) DownloadCacheTask(arg0 *dfdaemon.DownloadCacheTaskRequest, arg1 dfdaemon.DfdaemonUpload_DownloadCacheTaskServer) error { +// DownloadPersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadServer) DownloadPersistentCacheTask(arg0 *dfdaemon.DownloadPersistentCacheTaskRequest, arg1 dfdaemon.DfdaemonUpload_DownloadPersistentCacheTaskServer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DownloadCacheTask", arg0, arg1) + ret := m.ctrl.Call(m, "DownloadPersistentCacheTask", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } -// DownloadCacheTask indicates an expected call of DownloadCacheTask. -func (mr *MockDfdaemonUploadServerMockRecorder) DownloadCacheTask(arg0, arg1 any) *gomock.Call { +// DownloadPersistentCacheTask indicates an expected call of DownloadPersistentCacheTask. +func (mr *MockDfdaemonUploadServerMockRecorder) DownloadPersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DownloadCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DownloadPersistentCacheTask), arg0, arg1) } // DownloadPiece mocks base method. @@ -669,19 +669,19 @@ func (mr *MockDfdaemonUploadServerMockRecorder) DownloadTask(arg0, arg1 any) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).DownloadTask), arg0, arg1) } -// StatCacheTask mocks base method. -func (m *MockDfdaemonUploadServer) StatCacheTask(arg0 context.Context, arg1 *dfdaemon.StatCacheTaskRequest) (*common.CacheTask, error) { +// StatPersistentCacheTask mocks base method. +func (m *MockDfdaemonUploadServer) StatPersistentCacheTask(arg0 context.Context, arg1 *dfdaemon.StatPersistentCacheTaskRequest) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatCacheTask", arg0, arg1) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "StatPersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockDfdaemonUploadServerMockRecorder) StatCacheTask(arg0, arg1 any) *gomock.Call { +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockDfdaemonUploadServerMockRecorder) StatPersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).StatCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockDfdaemonUploadServer)(nil).StatPersistentCacheTask), arg0, arg1) } // StatTask mocks base method. @@ -986,31 +986,31 @@ func (mr *MockDfdaemonUpload_SyncPiecesServerMockRecorder) SetTrailer(arg0 any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonUpload_SyncPiecesServer)(nil).SetTrailer), arg0) } -// MockDfdaemonUpload_DownloadCacheTaskServer is a mock of DfdaemonUpload_DownloadCacheTaskServer interface. -type MockDfdaemonUpload_DownloadCacheTaskServer struct { +// MockDfdaemonUpload_DownloadPersistentCacheTaskServer is a mock of DfdaemonUpload_DownloadPersistentCacheTaskServer interface. +type MockDfdaemonUpload_DownloadPersistentCacheTaskServer struct { ctrl *gomock.Controller - recorder *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder + recorder *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder } -// MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder is the mock recorder for MockDfdaemonUpload_DownloadCacheTaskServer. -type MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder struct { - mock *MockDfdaemonUpload_DownloadCacheTaskServer +// MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder is the mock recorder for MockDfdaemonUpload_DownloadPersistentCacheTaskServer. +type MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder struct { + mock *MockDfdaemonUpload_DownloadPersistentCacheTaskServer } -// NewMockDfdaemonUpload_DownloadCacheTaskServer creates a new mock instance. -func NewMockDfdaemonUpload_DownloadCacheTaskServer(ctrl *gomock.Controller) *MockDfdaemonUpload_DownloadCacheTaskServer { - mock := &MockDfdaemonUpload_DownloadCacheTaskServer{ctrl: ctrl} - mock.recorder = &MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder{mock} +// NewMockDfdaemonUpload_DownloadPersistentCacheTaskServer creates a new mock instance. +func NewMockDfdaemonUpload_DownloadPersistentCacheTaskServer(ctrl *gomock.Controller) *MockDfdaemonUpload_DownloadPersistentCacheTaskServer { + mock := &MockDfdaemonUpload_DownloadPersistentCacheTaskServer{ctrl: ctrl} + mock.recorder = &MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) EXPECT() *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) EXPECT() *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder { return m.recorder } // Context mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) Context() context.Context { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -1018,13 +1018,13 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskServer) Context() context.Context { } // Context indicates an expected call of Context. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) Context() *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).Context)) } // RecvMsg mocks base method. -func (m_2 *MockDfdaemonUpload_DownloadCacheTaskServer) RecvMsg(m any) error { +func (m_2 *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -1032,13 +1032,13 @@ func (m_2 *MockDfdaemonUpload_DownloadCacheTaskServer) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).RecvMsg), m) } // Send mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) Send(arg0 *dfdaemon.DownloadCacheTaskResponse) error { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) Send(arg0 *dfdaemon.DownloadPersistentCacheTaskResponse) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) @@ -1046,13 +1046,13 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskServer) Send(arg0 *dfdaemon.Downloa } // Send indicates an expected call of Send. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) Send(arg0 any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) Send(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).Send), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).Send), arg0) } // SendHeader mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) SendHeader(arg0 metadata.MD) error { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) SendHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendHeader", arg0) ret0, _ := ret[0].(error) @@ -1060,13 +1060,13 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskServer) SendHeader(arg0 metadata.MD } // SendHeader indicates an expected call of SendHeader. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) SendHeader(arg0 any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) SendHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).SendHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).SendHeader), arg0) } // SendMsg mocks base method. -func (m_2 *MockDfdaemonUpload_DownloadCacheTaskServer) SendMsg(m any) error { +func (m_2 *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -1074,13 +1074,13 @@ func (m_2 *MockDfdaemonUpload_DownloadCacheTaskServer) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).SendMsg), m) } // SetHeader mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) SetHeader(arg0 metadata.MD) error { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) SetHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetHeader", arg0) ret0, _ := ret[0].(error) @@ -1088,21 +1088,21 @@ func (m *MockDfdaemonUpload_DownloadCacheTaskServer) SetHeader(arg0 metadata.MD) } // SetHeader indicates an expected call of SetHeader. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) SetHeader(arg0 any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) SetHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).SetHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).SetHeader), arg0) } // SetTrailer mocks base method. -func (m *MockDfdaemonUpload_DownloadCacheTaskServer) SetTrailer(arg0 metadata.MD) { +func (m *MockDfdaemonUpload_DownloadPersistentCacheTaskServer) SetTrailer(arg0 metadata.MD) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetTrailer", arg0) } // SetTrailer indicates an expected call of SetTrailer. -func (mr *MockDfdaemonUpload_DownloadCacheTaskServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { +func (mr *MockDfdaemonUpload_DownloadPersistentCacheTaskServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonUpload_DownloadCacheTaskServer)(nil).SetTrailer), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonUpload_DownloadPersistentCacheTaskServer)(nil).SetTrailer), arg0) } // MockDfdaemonDownloadClient is a mock of DfdaemonDownloadClient interface. @@ -1128,26 +1128,6 @@ func (m *MockDfdaemonDownloadClient) EXPECT() *MockDfdaemonDownloadClientMockRec return m.recorder } -// DeleteCacheTask mocks base method. -func (m *MockDfdaemonDownloadClient) DeleteCacheTask(ctx context.Context, in *dfdaemon.DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - varargs := []any{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "DeleteCacheTask", varargs...) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockDfdaemonDownloadClientMockRecorder) DeleteCacheTask(ctx, in any, opts ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DeleteCacheTask), varargs...) -} - // DeleteHost mocks base method. func (m *MockDfdaemonDownloadClient) DeleteHost(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -1168,6 +1148,26 @@ func (mr *MockDfdaemonDownloadClientMockRecorder) DeleteHost(ctx, in any, opts . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteHost", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DeleteHost), varargs...) } +// DeletePersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadClient) DeletePersistentCacheTask(ctx context.Context, in *dfdaemon.DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockDfdaemonDownloadClientMockRecorder) DeletePersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DeletePersistentCacheTask), varargs...) +} + // DeleteTask mocks base method. func (m *MockDfdaemonDownloadClient) DeleteTask(ctx context.Context, in *dfdaemon.DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -1188,24 +1188,24 @@ func (mr *MockDfdaemonDownloadClientMockRecorder) DeleteTask(ctx, in any, opts . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DeleteTask), varargs...) } -// DownloadCacheTask mocks base method. -func (m *MockDfdaemonDownloadClient) DownloadCacheTask(ctx context.Context, in *dfdaemon.DownloadCacheTaskRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonDownload_DownloadCacheTaskClient, error) { +// DownloadPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadClient) DownloadPersistentCacheTask(ctx context.Context, in *dfdaemon.DownloadPersistentCacheTaskRequest, opts ...grpc.CallOption) (dfdaemon.DfdaemonDownload_DownloadPersistentCacheTaskClient, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "DownloadCacheTask", varargs...) - ret0, _ := ret[0].(dfdaemon.DfdaemonDownload_DownloadCacheTaskClient) + ret := m.ctrl.Call(m, "DownloadPersistentCacheTask", varargs...) + ret0, _ := ret[0].(dfdaemon.DfdaemonDownload_DownloadPersistentCacheTaskClient) ret1, _ := ret[1].(error) return ret0, ret1 } -// DownloadCacheTask indicates an expected call of DownloadCacheTask. -func (mr *MockDfdaemonDownloadClientMockRecorder) DownloadCacheTask(ctx, in any, opts ...any) *gomock.Call { +// DownloadPersistentCacheTask indicates an expected call of DownloadPersistentCacheTask. +func (mr *MockDfdaemonDownloadClientMockRecorder) DownloadPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DownloadCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DownloadPersistentCacheTask), varargs...) } // DownloadTask mocks base method. @@ -1228,24 +1228,24 @@ func (mr *MockDfdaemonDownloadClientMockRecorder) DownloadTask(ctx, in any, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).DownloadTask), varargs...) } -// StatCacheTask mocks base method. -func (m *MockDfdaemonDownloadClient) StatCacheTask(ctx context.Context, in *dfdaemon.StatCacheTaskRequest, opts ...grpc.CallOption) (*common.CacheTask, error) { +// StatPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadClient) StatPersistentCacheTask(ctx context.Context, in *dfdaemon.StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "StatCacheTask", varargs...) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "StatPersistentCacheTask", varargs...) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockDfdaemonDownloadClientMockRecorder) StatCacheTask(ctx, in any, opts ...any) *gomock.Call { +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockDfdaemonDownloadClientMockRecorder) StatPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).StatCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).StatPersistentCacheTask), varargs...) } // StatTask mocks base method. @@ -1268,24 +1268,24 @@ func (mr *MockDfdaemonDownloadClientMockRecorder) StatTask(ctx, in any, opts ... return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).StatTask), varargs...) } -// UploadCacheTask mocks base method. -func (m *MockDfdaemonDownloadClient) UploadCacheTask(ctx context.Context, in *dfdaemon.UploadCacheTaskRequest, opts ...grpc.CallOption) (*common.CacheTask, error) { +// UploadPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadClient) UploadPersistentCacheTask(ctx context.Context, in *dfdaemon.UploadPersistentCacheTaskRequest, opts ...grpc.CallOption) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "UploadCacheTask", varargs...) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "UploadPersistentCacheTask", varargs...) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTask indicates an expected call of UploadCacheTask. -func (mr *MockDfdaemonDownloadClientMockRecorder) UploadCacheTask(ctx, in any, opts ...any) *gomock.Call { +// UploadPersistentCacheTask indicates an expected call of UploadPersistentCacheTask. +func (mr *MockDfdaemonDownloadClientMockRecorder) UploadPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).UploadCacheTask), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadClient)(nil).UploadPersistentCacheTask), varargs...) } // UploadTask mocks base method. @@ -1431,31 +1431,31 @@ func (mr *MockDfdaemonDownload_DownloadTaskClientMockRecorder) Trailer() *gomock return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadTaskClient)(nil).Trailer)) } -// MockDfdaemonDownload_DownloadCacheTaskClient is a mock of DfdaemonDownload_DownloadCacheTaskClient interface. -type MockDfdaemonDownload_DownloadCacheTaskClient struct { +// MockDfdaemonDownload_DownloadPersistentCacheTaskClient is a mock of DfdaemonDownload_DownloadPersistentCacheTaskClient interface. +type MockDfdaemonDownload_DownloadPersistentCacheTaskClient struct { ctrl *gomock.Controller - recorder *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder + recorder *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder } -// MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder is the mock recorder for MockDfdaemonDownload_DownloadCacheTaskClient. -type MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder struct { - mock *MockDfdaemonDownload_DownloadCacheTaskClient +// MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder is the mock recorder for MockDfdaemonDownload_DownloadPersistentCacheTaskClient. +type MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder struct { + mock *MockDfdaemonDownload_DownloadPersistentCacheTaskClient } -// NewMockDfdaemonDownload_DownloadCacheTaskClient creates a new mock instance. -func NewMockDfdaemonDownload_DownloadCacheTaskClient(ctrl *gomock.Controller) *MockDfdaemonDownload_DownloadCacheTaskClient { - mock := &MockDfdaemonDownload_DownloadCacheTaskClient{ctrl: ctrl} - mock.recorder = &MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder{mock} +// NewMockDfdaemonDownload_DownloadPersistentCacheTaskClient creates a new mock instance. +func NewMockDfdaemonDownload_DownloadPersistentCacheTaskClient(ctrl *gomock.Controller) *MockDfdaemonDownload_DownloadPersistentCacheTaskClient { + mock := &MockDfdaemonDownload_DownloadPersistentCacheTaskClient{ctrl: ctrl} + mock.recorder = &MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) EXPECT() *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) EXPECT() *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder { return m.recorder } // CloseSend mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) CloseSend() error { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) CloseSend() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CloseSend") ret0, _ := ret[0].(error) @@ -1463,13 +1463,13 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskClient) CloseSend() error { } // CloseSend indicates an expected call of CloseSend. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) CloseSend() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) CloseSend() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).CloseSend)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).CloseSend)) } // Context mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Context() context.Context { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -1477,13 +1477,13 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Context() context.Context } // Context indicates an expected call of Context. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) Context() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).Context)) } // Header mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Header() (metadata.MD, error) { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) Header() (metadata.MD, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Header") ret0, _ := ret[0].(metadata.MD) @@ -1492,28 +1492,28 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Header() (metadata.MD, er } // Header indicates an expected call of Header. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) Header() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) Header() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).Header)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).Header)) } // Recv mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Recv() (*dfdaemon.DownloadCacheTaskResponse, error) { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) Recv() (*dfdaemon.DownloadPersistentCacheTaskResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*dfdaemon.DownloadCacheTaskResponse) + ret0, _ := ret[0].(*dfdaemon.DownloadPersistentCacheTaskResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // Recv indicates an expected call of Recv. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) Recv() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) Recv() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).Recv)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).Recv)) } // RecvMsg mocks base method. -func (m_2 *MockDfdaemonDownload_DownloadCacheTaskClient) RecvMsg(m any) error { +func (m_2 *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -1521,13 +1521,13 @@ func (m_2 *MockDfdaemonDownload_DownloadCacheTaskClient) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).RecvMsg), m) } // SendMsg mocks base method. -func (m_2 *MockDfdaemonDownload_DownloadCacheTaskClient) SendMsg(m any) error { +func (m_2 *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -1535,13 +1535,13 @@ func (m_2 *MockDfdaemonDownload_DownloadCacheTaskClient) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).SendMsg), m) } // Trailer mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Trailer() metadata.MD { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskClient) Trailer() metadata.MD { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Trailer") ret0, _ := ret[0].(metadata.MD) @@ -1549,9 +1549,9 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskClient) Trailer() metadata.MD { } // Trailer indicates an expected call of Trailer. -func (mr *MockDfdaemonDownload_DownloadCacheTaskClientMockRecorder) Trailer() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskClientMockRecorder) Trailer() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskClient)(nil).Trailer)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskClient)(nil).Trailer)) } // MockDfdaemonDownloadServer is a mock of DfdaemonDownloadServer interface. @@ -1577,21 +1577,6 @@ func (m *MockDfdaemonDownloadServer) EXPECT() *MockDfdaemonDownloadServerMockRec return m.recorder } -// DeleteCacheTask mocks base method. -func (m *MockDfdaemonDownloadServer) DeleteCacheTask(arg0 context.Context, arg1 *dfdaemon.DeleteCacheTaskRequest) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteCacheTask", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockDfdaemonDownloadServerMockRecorder) DeleteCacheTask(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DeleteCacheTask), arg0, arg1) -} - // DeleteHost mocks base method. func (m *MockDfdaemonDownloadServer) DeleteHost(arg0 context.Context, arg1 *emptypb.Empty) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -1607,6 +1592,21 @@ func (mr *MockDfdaemonDownloadServerMockRecorder) DeleteHost(arg0, arg1 any) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteHost", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DeleteHost), arg0, arg1) } +// DeletePersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadServer) DeletePersistentCacheTask(arg0 context.Context, arg1 *dfdaemon.DeletePersistentCacheTaskRequest) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockDfdaemonDownloadServerMockRecorder) DeletePersistentCacheTask(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DeletePersistentCacheTask), arg0, arg1) +} + // DeleteTask mocks base method. func (m *MockDfdaemonDownloadServer) DeleteTask(arg0 context.Context, arg1 *dfdaemon.DeleteTaskRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -1622,18 +1622,18 @@ func (mr *MockDfdaemonDownloadServerMockRecorder) DeleteTask(arg0, arg1 any) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DeleteTask), arg0, arg1) } -// DownloadCacheTask mocks base method. -func (m *MockDfdaemonDownloadServer) DownloadCacheTask(arg0 *dfdaemon.DownloadCacheTaskRequest, arg1 dfdaemon.DfdaemonDownload_DownloadCacheTaskServer) error { +// DownloadPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadServer) DownloadPersistentCacheTask(arg0 *dfdaemon.DownloadPersistentCacheTaskRequest, arg1 dfdaemon.DfdaemonDownload_DownloadPersistentCacheTaskServer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DownloadCacheTask", arg0, arg1) + ret := m.ctrl.Call(m, "DownloadPersistentCacheTask", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } -// DownloadCacheTask indicates an expected call of DownloadCacheTask. -func (mr *MockDfdaemonDownloadServerMockRecorder) DownloadCacheTask(arg0, arg1 any) *gomock.Call { +// DownloadPersistentCacheTask indicates an expected call of DownloadPersistentCacheTask. +func (mr *MockDfdaemonDownloadServerMockRecorder) DownloadPersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DownloadCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DownloadPersistentCacheTask), arg0, arg1) } // DownloadTask mocks base method. @@ -1650,19 +1650,19 @@ func (mr *MockDfdaemonDownloadServerMockRecorder) DownloadTask(arg0, arg1 any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).DownloadTask), arg0, arg1) } -// StatCacheTask mocks base method. -func (m *MockDfdaemonDownloadServer) StatCacheTask(arg0 context.Context, arg1 *dfdaemon.StatCacheTaskRequest) (*common.CacheTask, error) { +// StatPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadServer) StatPersistentCacheTask(arg0 context.Context, arg1 *dfdaemon.StatPersistentCacheTaskRequest) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatCacheTask", arg0, arg1) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "StatPersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockDfdaemonDownloadServerMockRecorder) StatCacheTask(arg0, arg1 any) *gomock.Call { +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockDfdaemonDownloadServerMockRecorder) StatPersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).StatCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).StatPersistentCacheTask), arg0, arg1) } // StatTask mocks base method. @@ -1680,19 +1680,19 @@ func (mr *MockDfdaemonDownloadServerMockRecorder) StatTask(arg0, arg1 any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).StatTask), arg0, arg1) } -// UploadCacheTask mocks base method. -func (m *MockDfdaemonDownloadServer) UploadCacheTask(arg0 context.Context, arg1 *dfdaemon.UploadCacheTaskRequest) (*common.CacheTask, error) { +// UploadPersistentCacheTask mocks base method. +func (m *MockDfdaemonDownloadServer) UploadPersistentCacheTask(arg0 context.Context, arg1 *dfdaemon.UploadPersistentCacheTaskRequest) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UploadCacheTask", arg0, arg1) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "UploadPersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTask indicates an expected call of UploadCacheTask. -func (mr *MockDfdaemonDownloadServerMockRecorder) UploadCacheTask(arg0, arg1 any) *gomock.Call { +// UploadPersistentCacheTask indicates an expected call of UploadPersistentCacheTask. +func (mr *MockDfdaemonDownloadServerMockRecorder) UploadPersistentCacheTask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).UploadCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTask", reflect.TypeOf((*MockDfdaemonDownloadServer)(nil).UploadPersistentCacheTask), arg0, arg1) } // UploadTask mocks base method. @@ -1864,31 +1864,31 @@ func (mr *MockDfdaemonDownload_DownloadTaskServerMockRecorder) SetTrailer(arg0 a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadTaskServer)(nil).SetTrailer), arg0) } -// MockDfdaemonDownload_DownloadCacheTaskServer is a mock of DfdaemonDownload_DownloadCacheTaskServer interface. -type MockDfdaemonDownload_DownloadCacheTaskServer struct { +// MockDfdaemonDownload_DownloadPersistentCacheTaskServer is a mock of DfdaemonDownload_DownloadPersistentCacheTaskServer interface. +type MockDfdaemonDownload_DownloadPersistentCacheTaskServer struct { ctrl *gomock.Controller - recorder *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder + recorder *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder } -// MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder is the mock recorder for MockDfdaemonDownload_DownloadCacheTaskServer. -type MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder struct { - mock *MockDfdaemonDownload_DownloadCacheTaskServer +// MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder is the mock recorder for MockDfdaemonDownload_DownloadPersistentCacheTaskServer. +type MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder struct { + mock *MockDfdaemonDownload_DownloadPersistentCacheTaskServer } -// NewMockDfdaemonDownload_DownloadCacheTaskServer creates a new mock instance. -func NewMockDfdaemonDownload_DownloadCacheTaskServer(ctrl *gomock.Controller) *MockDfdaemonDownload_DownloadCacheTaskServer { - mock := &MockDfdaemonDownload_DownloadCacheTaskServer{ctrl: ctrl} - mock.recorder = &MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder{mock} +// NewMockDfdaemonDownload_DownloadPersistentCacheTaskServer creates a new mock instance. +func NewMockDfdaemonDownload_DownloadPersistentCacheTaskServer(ctrl *gomock.Controller) *MockDfdaemonDownload_DownloadPersistentCacheTaskServer { + mock := &MockDfdaemonDownload_DownloadPersistentCacheTaskServer{ctrl: ctrl} + mock.recorder = &MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) EXPECT() *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) EXPECT() *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder { return m.recorder } // Context mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) Context() context.Context { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -1896,13 +1896,13 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskServer) Context() context.Context } // Context indicates an expected call of Context. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) Context() *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).Context)) } // RecvMsg mocks base method. -func (m_2 *MockDfdaemonDownload_DownloadCacheTaskServer) RecvMsg(m any) error { +func (m_2 *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -1910,13 +1910,13 @@ func (m_2 *MockDfdaemonDownload_DownloadCacheTaskServer) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).RecvMsg), m) } // Send mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) Send(arg0 *dfdaemon.DownloadCacheTaskResponse) error { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) Send(arg0 *dfdaemon.DownloadPersistentCacheTaskResponse) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) @@ -1924,13 +1924,13 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskServer) Send(arg0 *dfdaemon.Downl } // Send indicates an expected call of Send. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) Send(arg0 any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) Send(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).Send), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).Send), arg0) } // SendHeader mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) SendHeader(arg0 metadata.MD) error { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) SendHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendHeader", arg0) ret0, _ := ret[0].(error) @@ -1938,13 +1938,13 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskServer) SendHeader(arg0 metadata. } // SendHeader indicates an expected call of SendHeader. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) SendHeader(arg0 any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) SendHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).SendHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).SendHeader), arg0) } // SendMsg mocks base method. -func (m_2 *MockDfdaemonDownload_DownloadCacheTaskServer) SendMsg(m any) error { +func (m_2 *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -1952,13 +1952,13 @@ func (m_2 *MockDfdaemonDownload_DownloadCacheTaskServer) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).SendMsg), m) } // SetHeader mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) SetHeader(arg0 metadata.MD) error { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) SetHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetHeader", arg0) ret0, _ := ret[0].(error) @@ -1966,19 +1966,19 @@ func (m *MockDfdaemonDownload_DownloadCacheTaskServer) SetHeader(arg0 metadata.M } // SetHeader indicates an expected call of SetHeader. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) SetHeader(arg0 any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) SetHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).SetHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).SetHeader), arg0) } // SetTrailer mocks base method. -func (m *MockDfdaemonDownload_DownloadCacheTaskServer) SetTrailer(arg0 metadata.MD) { +func (m *MockDfdaemonDownload_DownloadPersistentCacheTaskServer) SetTrailer(arg0 metadata.MD) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetTrailer", arg0) } // SetTrailer indicates an expected call of SetTrailer. -func (mr *MockDfdaemonDownload_DownloadCacheTaskServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { +func (mr *MockDfdaemonDownload_DownloadPersistentCacheTaskServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadCacheTaskServer)(nil).SetTrailer), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockDfdaemonDownload_DownloadPersistentCacheTaskServer)(nil).SetTrailer), arg0) } diff --git a/pkg/apis/scheduler/v2/mocks/scheduler_mock.go b/pkg/apis/scheduler/v2/mocks/scheduler_mock.go index 59a4364..e637fbb 100644 --- a/pkg/apis/scheduler/v2/mocks/scheduler_mock.go +++ b/pkg/apis/scheduler/v2/mocks/scheduler_mock.go @@ -44,26 +44,6 @@ func (m *MockSchedulerClient) EXPECT() *MockSchedulerClientMockRecorder { return m.recorder } -// AnnounceCachePeer mocks base method. -func (m *MockSchedulerClient) AnnounceCachePeer(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_AnnounceCachePeerClient, error) { - m.ctrl.T.Helper() - varargs := []any{ctx} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "AnnounceCachePeer", varargs...) - ret0, _ := ret[0].(scheduler.Scheduler_AnnounceCachePeerClient) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// AnnounceCachePeer indicates an expected call of AnnounceCachePeer. -func (mr *MockSchedulerClientMockRecorder) AnnounceCachePeer(ctx any, opts ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnounceCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).AnnounceCachePeer), varargs...) -} - // AnnounceHost mocks base method. func (m *MockSchedulerClient) AnnounceHost(ctx context.Context, in *scheduler.AnnounceHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -104,44 +84,24 @@ func (mr *MockSchedulerClientMockRecorder) AnnouncePeer(ctx any, opts ...any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePeer", reflect.TypeOf((*MockSchedulerClient)(nil).AnnouncePeer), varargs...) } -// DeleteCachePeer mocks base method. -func (m *MockSchedulerClient) DeleteCachePeer(ctx context.Context, in *scheduler.DeleteCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +// AnnouncePersistentCachePeer mocks base method. +func (m *MockSchedulerClient) AnnouncePersistentCachePeer(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_AnnouncePersistentCachePeerClient, error) { m.ctrl.T.Helper() - varargs := []any{ctx, in} + varargs := []any{ctx} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "DeleteCachePeer", varargs...) - ret0, _ := ret[0].(*emptypb.Empty) + ret := m.ctrl.Call(m, "AnnouncePersistentCachePeer", varargs...) + ret0, _ := ret[0].(scheduler.Scheduler_AnnouncePersistentCachePeerClient) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteCachePeer indicates an expected call of DeleteCachePeer. -func (mr *MockSchedulerClientMockRecorder) DeleteCachePeer(ctx, in any, opts ...any) *gomock.Call { +// AnnouncePersistentCachePeer indicates an expected call of AnnouncePersistentCachePeer. +func (mr *MockSchedulerClientMockRecorder) AnnouncePersistentCachePeer(ctx any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).DeleteCachePeer), varargs...) -} - -// DeleteCacheTask mocks base method. -func (m *MockSchedulerClient) DeleteCacheTask(ctx context.Context, in *scheduler.DeleteCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - varargs := []any{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "DeleteCacheTask", varargs...) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockSchedulerClientMockRecorder) DeleteCacheTask(ctx, in any, opts ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).DeleteCacheTask), varargs...) + varargs := append([]any{ctx}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePersistentCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).AnnouncePersistentCachePeer), varargs...) } // DeleteHost mocks base method. @@ -184,6 +144,46 @@ func (mr *MockSchedulerClientMockRecorder) DeletePeer(ctx, in any, opts ...any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePeer", reflect.TypeOf((*MockSchedulerClient)(nil).DeletePeer), varargs...) } +// DeletePersistentCachePeer mocks base method. +func (m *MockSchedulerClient) DeletePersistentCachePeer(ctx context.Context, in *scheduler.DeletePersistentCachePeerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeletePersistentCachePeer", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCachePeer indicates an expected call of DeletePersistentCachePeer. +func (mr *MockSchedulerClientMockRecorder) DeletePersistentCachePeer(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).DeletePersistentCachePeer), varargs...) +} + +// DeletePersistentCacheTask mocks base method. +func (m *MockSchedulerClient) DeletePersistentCacheTask(ctx context.Context, in *scheduler.DeletePersistentCacheTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockSchedulerClientMockRecorder) DeletePersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).DeletePersistentCacheTask), varargs...) +} + // DeleteTask mocks base method. func (m *MockSchedulerClient) DeleteTask(ctx context.Context, in *scheduler.DeleteTaskRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -224,46 +224,6 @@ func (mr *MockSchedulerClientMockRecorder) ListHosts(ctx, in any, opts ...any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListHosts", reflect.TypeOf((*MockSchedulerClient)(nil).ListHosts), varargs...) } -// StatCachePeer mocks base method. -func (m *MockSchedulerClient) StatCachePeer(ctx context.Context, in *scheduler.StatCachePeerRequest, opts ...grpc.CallOption) (*common.CachePeer, error) { - m.ctrl.T.Helper() - varargs := []any{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "StatCachePeer", varargs...) - ret0, _ := ret[0].(*common.CachePeer) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// StatCachePeer indicates an expected call of StatCachePeer. -func (mr *MockSchedulerClientMockRecorder) StatCachePeer(ctx, in any, opts ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).StatCachePeer), varargs...) -} - -// StatCacheTask mocks base method. -func (m *MockSchedulerClient) StatCacheTask(ctx context.Context, in *scheduler.StatCacheTaskRequest, opts ...grpc.CallOption) (*common.CacheTask, error) { - m.ctrl.T.Helper() - varargs := []any{ctx, in} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "StatCacheTask", varargs...) - ret0, _ := ret[0].(*common.CacheTask) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockSchedulerClientMockRecorder) StatCacheTask(ctx, in any, opts ...any) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatCacheTask), varargs...) -} - // StatPeer mocks base method. func (m *MockSchedulerClient) StatPeer(ctx context.Context, in *scheduler.StatPeerRequest, opts ...grpc.CallOption) (*common.Peer, error) { m.ctrl.T.Helper() @@ -284,6 +244,46 @@ func (mr *MockSchedulerClientMockRecorder) StatPeer(ctx, in any, opts ...any) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPeer", reflect.TypeOf((*MockSchedulerClient)(nil).StatPeer), varargs...) } +// StatPersistentCachePeer mocks base method. +func (m *MockSchedulerClient) StatPersistentCachePeer(ctx context.Context, in *scheduler.StatPersistentCachePeerRequest, opts ...grpc.CallOption) (*common.PersistentCachePeer, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StatPersistentCachePeer", varargs...) + ret0, _ := ret[0].(*common.PersistentCachePeer) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatPersistentCachePeer indicates an expected call of StatPersistentCachePeer. +func (mr *MockSchedulerClientMockRecorder) StatPersistentCachePeer(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCachePeer", reflect.TypeOf((*MockSchedulerClient)(nil).StatPersistentCachePeer), varargs...) +} + +// StatPersistentCacheTask mocks base method. +func (m *MockSchedulerClient) StatPersistentCacheTask(ctx context.Context, in *scheduler.StatPersistentCacheTaskRequest, opts ...grpc.CallOption) (*common.PersistentCacheTask, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StatPersistentCacheTask", varargs...) + ret0, _ := ret[0].(*common.PersistentCacheTask) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockSchedulerClientMockRecorder) StatPersistentCacheTask(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatPersistentCacheTask), varargs...) +} + // StatTask mocks base method. func (m *MockSchedulerClient) StatTask(ctx context.Context, in *scheduler.StatTaskRequest, opts ...grpc.CallOption) (*common.Task, error) { m.ctrl.T.Helper() @@ -324,64 +324,64 @@ func (mr *MockSchedulerClientMockRecorder) SyncProbes(ctx any, opts ...any) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncProbes", reflect.TypeOf((*MockSchedulerClient)(nil).SyncProbes), varargs...) } -// UploadCacheTaskFailed mocks base method. -func (m *MockSchedulerClient) UploadCacheTaskFailed(ctx context.Context, in *scheduler.UploadCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +// UploadPersistentCacheTaskFailed mocks base method. +func (m *MockSchedulerClient) UploadPersistentCacheTaskFailed(ctx context.Context, in *scheduler.UploadPersistentCacheTaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "UploadCacheTaskFailed", varargs...) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskFailed", varargs...) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskFailed indicates an expected call of UploadCacheTaskFailed. -func (mr *MockSchedulerClientMockRecorder) UploadCacheTaskFailed(ctx, in any, opts ...any) *gomock.Call { +// UploadPersistentCacheTaskFailed indicates an expected call of UploadPersistentCacheTaskFailed. +func (mr *MockSchedulerClientMockRecorder) UploadPersistentCacheTaskFailed(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskFailed", reflect.TypeOf((*MockSchedulerClient)(nil).UploadCacheTaskFailed), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskFailed", reflect.TypeOf((*MockSchedulerClient)(nil).UploadPersistentCacheTaskFailed), varargs...) } -// UploadCacheTaskFinished mocks base method. -func (m *MockSchedulerClient) UploadCacheTaskFinished(ctx context.Context, in *scheduler.UploadCacheTaskFinishedRequest, opts ...grpc.CallOption) (*common.CacheTask, error) { +// UploadPersistentCacheTaskFinished mocks base method. +func (m *MockSchedulerClient) UploadPersistentCacheTaskFinished(ctx context.Context, in *scheduler.UploadPersistentCacheTaskFinishedRequest, opts ...grpc.CallOption) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "UploadCacheTaskFinished", varargs...) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskFinished", varargs...) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskFinished indicates an expected call of UploadCacheTaskFinished. -func (mr *MockSchedulerClientMockRecorder) UploadCacheTaskFinished(ctx, in any, opts ...any) *gomock.Call { +// UploadPersistentCacheTaskFinished indicates an expected call of UploadPersistentCacheTaskFinished. +func (mr *MockSchedulerClientMockRecorder) UploadPersistentCacheTaskFinished(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskFinished", reflect.TypeOf((*MockSchedulerClient)(nil).UploadCacheTaskFinished), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskFinished", reflect.TypeOf((*MockSchedulerClient)(nil).UploadPersistentCacheTaskFinished), varargs...) } -// UploadCacheTaskStarted mocks base method. -func (m *MockSchedulerClient) UploadCacheTaskStarted(ctx context.Context, in *scheduler.UploadCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +// UploadPersistentCacheTaskStarted mocks base method. +func (m *MockSchedulerClient) UploadPersistentCacheTaskStarted(ctx context.Context, in *scheduler.UploadPersistentCacheTaskStartedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() varargs := []any{ctx, in} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "UploadCacheTaskStarted", varargs...) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskStarted", varargs...) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskStarted indicates an expected call of UploadCacheTaskStarted. -func (mr *MockSchedulerClientMockRecorder) UploadCacheTaskStarted(ctx, in any, opts ...any) *gomock.Call { +// UploadPersistentCacheTaskStarted indicates an expected call of UploadPersistentCacheTaskStarted. +func (mr *MockSchedulerClientMockRecorder) UploadPersistentCacheTaskStarted(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskStarted", reflect.TypeOf((*MockSchedulerClient)(nil).UploadCacheTaskStarted), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskStarted", reflect.TypeOf((*MockSchedulerClient)(nil).UploadPersistentCacheTaskStarted), varargs...) } // MockScheduler_AnnouncePeerClient is a mock of Scheduler_AnnouncePeerClient interface. @@ -658,31 +658,31 @@ func (mr *MockScheduler_SyncProbesClientMockRecorder) Trailer() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Trailer)) } -// MockScheduler_AnnounceCachePeerClient is a mock of Scheduler_AnnounceCachePeerClient interface. -type MockScheduler_AnnounceCachePeerClient struct { +// MockScheduler_AnnouncePersistentCachePeerClient is a mock of Scheduler_AnnouncePersistentCachePeerClient interface. +type MockScheduler_AnnouncePersistentCachePeerClient struct { ctrl *gomock.Controller - recorder *MockScheduler_AnnounceCachePeerClientMockRecorder + recorder *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder } -// MockScheduler_AnnounceCachePeerClientMockRecorder is the mock recorder for MockScheduler_AnnounceCachePeerClient. -type MockScheduler_AnnounceCachePeerClientMockRecorder struct { - mock *MockScheduler_AnnounceCachePeerClient +// MockScheduler_AnnouncePersistentCachePeerClientMockRecorder is the mock recorder for MockScheduler_AnnouncePersistentCachePeerClient. +type MockScheduler_AnnouncePersistentCachePeerClientMockRecorder struct { + mock *MockScheduler_AnnouncePersistentCachePeerClient } -// NewMockScheduler_AnnounceCachePeerClient creates a new mock instance. -func NewMockScheduler_AnnounceCachePeerClient(ctrl *gomock.Controller) *MockScheduler_AnnounceCachePeerClient { - mock := &MockScheduler_AnnounceCachePeerClient{ctrl: ctrl} - mock.recorder = &MockScheduler_AnnounceCachePeerClientMockRecorder{mock} +// NewMockScheduler_AnnouncePersistentCachePeerClient creates a new mock instance. +func NewMockScheduler_AnnouncePersistentCachePeerClient(ctrl *gomock.Controller) *MockScheduler_AnnouncePersistentCachePeerClient { + mock := &MockScheduler_AnnouncePersistentCachePeerClient{ctrl: ctrl} + mock.recorder = &MockScheduler_AnnouncePersistentCachePeerClientMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockScheduler_AnnounceCachePeerClient) EXPECT() *MockScheduler_AnnounceCachePeerClientMockRecorder { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) EXPECT() *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder { return m.recorder } // CloseSend mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) CloseSend() error { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) CloseSend() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CloseSend") ret0, _ := ret[0].(error) @@ -690,13 +690,13 @@ func (m *MockScheduler_AnnounceCachePeerClient) CloseSend() error { } // CloseSend indicates an expected call of CloseSend. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) CloseSend() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) CloseSend() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).CloseSend)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).CloseSend)) } // Context mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) Context() context.Context { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -704,13 +704,13 @@ func (m *MockScheduler_AnnounceCachePeerClient) Context() context.Context { } // Context indicates an expected call of Context. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Context() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).Context)) } // Header mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) Header() (metadata.MD, error) { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) Header() (metadata.MD, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Header") ret0, _ := ret[0].(metadata.MD) @@ -719,28 +719,28 @@ func (m *MockScheduler_AnnounceCachePeerClient) Header() (metadata.MD, error) { } // Header indicates an expected call of Header. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Header() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) Header() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Header)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).Header)) } // Recv mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) Recv() (*scheduler.AnnounceCachePeerResponse, error) { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) Recv() (*scheduler.AnnouncePersistentCachePeerResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*scheduler.AnnounceCachePeerResponse) + ret0, _ := ret[0].(*scheduler.AnnouncePersistentCachePeerResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // Recv indicates an expected call of Recv. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Recv() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) Recv() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Recv)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).Recv)) } // RecvMsg mocks base method. -func (m_2 *MockScheduler_AnnounceCachePeerClient) RecvMsg(m any) error { +func (m_2 *MockScheduler_AnnouncePersistentCachePeerClient) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -748,13 +748,13 @@ func (m_2 *MockScheduler_AnnounceCachePeerClient) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).RecvMsg), m) } // Send mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) Send(arg0 *scheduler.AnnounceCachePeerRequest) error { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) Send(arg0 *scheduler.AnnouncePersistentCachePeerRequest) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) @@ -762,13 +762,13 @@ func (m *MockScheduler_AnnounceCachePeerClient) Send(arg0 *scheduler.AnnounceCac } // Send indicates an expected call of Send. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Send(arg0 any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) Send(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Send), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).Send), arg0) } // SendMsg mocks base method. -func (m_2 *MockScheduler_AnnounceCachePeerClient) SendMsg(m any) error { +func (m_2 *MockScheduler_AnnouncePersistentCachePeerClient) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -776,13 +776,13 @@ func (m_2 *MockScheduler_AnnounceCachePeerClient) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).SendMsg), m) } // Trailer mocks base method. -func (m *MockScheduler_AnnounceCachePeerClient) Trailer() metadata.MD { +func (m *MockScheduler_AnnouncePersistentCachePeerClient) Trailer() metadata.MD { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Trailer") ret0, _ := ret[0].(metadata.MD) @@ -790,9 +790,9 @@ func (m *MockScheduler_AnnounceCachePeerClient) Trailer() metadata.MD { } // Trailer indicates an expected call of Trailer. -func (mr *MockScheduler_AnnounceCachePeerClientMockRecorder) Trailer() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerClientMockRecorder) Trailer() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_AnnounceCachePeerClient)(nil).Trailer)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerClient)(nil).Trailer)) } // MockSchedulerServer is a mock of SchedulerServer interface. @@ -818,20 +818,6 @@ func (m *MockSchedulerServer) EXPECT() *MockSchedulerServerMockRecorder { return m.recorder } -// AnnounceCachePeer mocks base method. -func (m *MockSchedulerServer) AnnounceCachePeer(arg0 scheduler.Scheduler_AnnounceCachePeerServer) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AnnounceCachePeer", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// AnnounceCachePeer indicates an expected call of AnnounceCachePeer. -func (mr *MockSchedulerServerMockRecorder) AnnounceCachePeer(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnounceCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).AnnounceCachePeer), arg0) -} - // AnnounceHost mocks base method. func (m *MockSchedulerServer) AnnounceHost(arg0 context.Context, arg1 *scheduler.AnnounceHostRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -861,34 +847,18 @@ func (mr *MockSchedulerServerMockRecorder) AnnouncePeer(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePeer", reflect.TypeOf((*MockSchedulerServer)(nil).AnnouncePeer), arg0) } -// DeleteCachePeer mocks base method. -func (m *MockSchedulerServer) DeleteCachePeer(arg0 context.Context, arg1 *scheduler.DeleteCachePeerRequest) (*emptypb.Empty, error) { +// AnnouncePersistentCachePeer mocks base method. +func (m *MockSchedulerServer) AnnouncePersistentCachePeer(arg0 scheduler.Scheduler_AnnouncePersistentCachePeerServer) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteCachePeer", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret := m.ctrl.Call(m, "AnnouncePersistentCachePeer", arg0) + ret0, _ := ret[0].(error) + return ret0 } -// DeleteCachePeer indicates an expected call of DeleteCachePeer. -func (mr *MockSchedulerServerMockRecorder) DeleteCachePeer(arg0, arg1 any) *gomock.Call { +// AnnouncePersistentCachePeer indicates an expected call of AnnouncePersistentCachePeer. +func (mr *MockSchedulerServerMockRecorder) AnnouncePersistentCachePeer(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).DeleteCachePeer), arg0, arg1) -} - -// DeleteCacheTask mocks base method. -func (m *MockSchedulerServer) DeleteCacheTask(arg0 context.Context, arg1 *scheduler.DeleteCacheTaskRequest) (*emptypb.Empty, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteCacheTask", arg0, arg1) - ret0, _ := ret[0].(*emptypb.Empty) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeleteCacheTask indicates an expected call of DeleteCacheTask. -func (mr *MockSchedulerServerMockRecorder) DeleteCacheTask(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).DeleteCacheTask), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AnnouncePersistentCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).AnnouncePersistentCachePeer), arg0) } // DeleteHost mocks base method. @@ -921,6 +891,36 @@ func (mr *MockSchedulerServerMockRecorder) DeletePeer(arg0, arg1 any) *gomock.Ca return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePeer", reflect.TypeOf((*MockSchedulerServer)(nil).DeletePeer), arg0, arg1) } +// DeletePersistentCachePeer mocks base method. +func (m *MockSchedulerServer) DeletePersistentCachePeer(arg0 context.Context, arg1 *scheduler.DeletePersistentCachePeerRequest) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeletePersistentCachePeer", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCachePeer indicates an expected call of DeletePersistentCachePeer. +func (mr *MockSchedulerServerMockRecorder) DeletePersistentCachePeer(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).DeletePersistentCachePeer), arg0, arg1) +} + +// DeletePersistentCacheTask mocks base method. +func (m *MockSchedulerServer) DeletePersistentCacheTask(arg0 context.Context, arg1 *scheduler.DeletePersistentCacheTaskRequest) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeletePersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeletePersistentCacheTask indicates an expected call of DeletePersistentCacheTask. +func (mr *MockSchedulerServerMockRecorder) DeletePersistentCacheTask(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePersistentCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).DeletePersistentCacheTask), arg0, arg1) +} + // DeleteTask mocks base method. func (m *MockSchedulerServer) DeleteTask(arg0 context.Context, arg1 *scheduler.DeleteTaskRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() @@ -951,36 +951,6 @@ func (mr *MockSchedulerServerMockRecorder) ListHosts(arg0, arg1 any) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListHosts", reflect.TypeOf((*MockSchedulerServer)(nil).ListHosts), arg0, arg1) } -// StatCachePeer mocks base method. -func (m *MockSchedulerServer) StatCachePeer(arg0 context.Context, arg1 *scheduler.StatCachePeerRequest) (*common.CachePeer, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatCachePeer", arg0, arg1) - ret0, _ := ret[0].(*common.CachePeer) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// StatCachePeer indicates an expected call of StatCachePeer. -func (mr *MockSchedulerServerMockRecorder) StatCachePeer(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).StatCachePeer), arg0, arg1) -} - -// StatCacheTask mocks base method. -func (m *MockSchedulerServer) StatCacheTask(arg0 context.Context, arg1 *scheduler.StatCacheTaskRequest) (*common.CacheTask, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StatCacheTask", arg0, arg1) - ret0, _ := ret[0].(*common.CacheTask) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// StatCacheTask indicates an expected call of StatCacheTask. -func (mr *MockSchedulerServerMockRecorder) StatCacheTask(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatCacheTask), arg0, arg1) -} - // StatPeer mocks base method. func (m *MockSchedulerServer) StatPeer(arg0 context.Context, arg1 *scheduler.StatPeerRequest) (*common.Peer, error) { m.ctrl.T.Helper() @@ -996,6 +966,36 @@ func (mr *MockSchedulerServerMockRecorder) StatPeer(arg0, arg1 any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPeer", reflect.TypeOf((*MockSchedulerServer)(nil).StatPeer), arg0, arg1) } +// StatPersistentCachePeer mocks base method. +func (m *MockSchedulerServer) StatPersistentCachePeer(arg0 context.Context, arg1 *scheduler.StatPersistentCachePeerRequest) (*common.PersistentCachePeer, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StatPersistentCachePeer", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCachePeer) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatPersistentCachePeer indicates an expected call of StatPersistentCachePeer. +func (mr *MockSchedulerServerMockRecorder) StatPersistentCachePeer(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCachePeer", reflect.TypeOf((*MockSchedulerServer)(nil).StatPersistentCachePeer), arg0, arg1) +} + +// StatPersistentCacheTask mocks base method. +func (m *MockSchedulerServer) StatPersistentCacheTask(arg0 context.Context, arg1 *scheduler.StatPersistentCacheTaskRequest) (*common.PersistentCacheTask, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StatPersistentCacheTask", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCacheTask) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StatPersistentCacheTask indicates an expected call of StatPersistentCacheTask. +func (mr *MockSchedulerServerMockRecorder) StatPersistentCacheTask(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatPersistentCacheTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatPersistentCacheTask), arg0, arg1) +} + // StatTask mocks base method. func (m *MockSchedulerServer) StatTask(arg0 context.Context, arg1 *scheduler.StatTaskRequest) (*common.Task, error) { m.ctrl.T.Helper() @@ -1025,49 +1025,49 @@ func (mr *MockSchedulerServerMockRecorder) SyncProbes(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncProbes", reflect.TypeOf((*MockSchedulerServer)(nil).SyncProbes), arg0) } -// UploadCacheTaskFailed mocks base method. -func (m *MockSchedulerServer) UploadCacheTaskFailed(arg0 context.Context, arg1 *scheduler.UploadCacheTaskFailedRequest) (*emptypb.Empty, error) { +// UploadPersistentCacheTaskFailed mocks base method. +func (m *MockSchedulerServer) UploadPersistentCacheTaskFailed(arg0 context.Context, arg1 *scheduler.UploadPersistentCacheTaskFailedRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UploadCacheTaskFailed", arg0, arg1) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskFailed", arg0, arg1) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskFailed indicates an expected call of UploadCacheTaskFailed. -func (mr *MockSchedulerServerMockRecorder) UploadCacheTaskFailed(arg0, arg1 any) *gomock.Call { +// UploadPersistentCacheTaskFailed indicates an expected call of UploadPersistentCacheTaskFailed. +func (mr *MockSchedulerServerMockRecorder) UploadPersistentCacheTaskFailed(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskFailed", reflect.TypeOf((*MockSchedulerServer)(nil).UploadCacheTaskFailed), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskFailed", reflect.TypeOf((*MockSchedulerServer)(nil).UploadPersistentCacheTaskFailed), arg0, arg1) } -// UploadCacheTaskFinished mocks base method. -func (m *MockSchedulerServer) UploadCacheTaskFinished(arg0 context.Context, arg1 *scheduler.UploadCacheTaskFinishedRequest) (*common.CacheTask, error) { +// UploadPersistentCacheTaskFinished mocks base method. +func (m *MockSchedulerServer) UploadPersistentCacheTaskFinished(arg0 context.Context, arg1 *scheduler.UploadPersistentCacheTaskFinishedRequest) (*common.PersistentCacheTask, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UploadCacheTaskFinished", arg0, arg1) - ret0, _ := ret[0].(*common.CacheTask) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskFinished", arg0, arg1) + ret0, _ := ret[0].(*common.PersistentCacheTask) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskFinished indicates an expected call of UploadCacheTaskFinished. -func (mr *MockSchedulerServerMockRecorder) UploadCacheTaskFinished(arg0, arg1 any) *gomock.Call { +// UploadPersistentCacheTaskFinished indicates an expected call of UploadPersistentCacheTaskFinished. +func (mr *MockSchedulerServerMockRecorder) UploadPersistentCacheTaskFinished(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskFinished", reflect.TypeOf((*MockSchedulerServer)(nil).UploadCacheTaskFinished), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskFinished", reflect.TypeOf((*MockSchedulerServer)(nil).UploadPersistentCacheTaskFinished), arg0, arg1) } -// UploadCacheTaskStarted mocks base method. -func (m *MockSchedulerServer) UploadCacheTaskStarted(arg0 context.Context, arg1 *scheduler.UploadCacheTaskStartedRequest) (*emptypb.Empty, error) { +// UploadPersistentCacheTaskStarted mocks base method. +func (m *MockSchedulerServer) UploadPersistentCacheTaskStarted(arg0 context.Context, arg1 *scheduler.UploadPersistentCacheTaskStartedRequest) (*emptypb.Empty, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UploadCacheTaskStarted", arg0, arg1) + ret := m.ctrl.Call(m, "UploadPersistentCacheTaskStarted", arg0, arg1) ret0, _ := ret[0].(*emptypb.Empty) ret1, _ := ret[1].(error) return ret0, ret1 } -// UploadCacheTaskStarted indicates an expected call of UploadCacheTaskStarted. -func (mr *MockSchedulerServerMockRecorder) UploadCacheTaskStarted(arg0, arg1 any) *gomock.Call { +// UploadPersistentCacheTaskStarted indicates an expected call of UploadPersistentCacheTaskStarted. +func (mr *MockSchedulerServerMockRecorder) UploadPersistentCacheTaskStarted(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadCacheTaskStarted", reflect.TypeOf((*MockSchedulerServer)(nil).UploadCacheTaskStarted), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UploadPersistentCacheTaskStarted", reflect.TypeOf((*MockSchedulerServer)(nil).UploadPersistentCacheTaskStarted), arg0, arg1) } // MockUnsafeSchedulerServer is a mock of UnsafeSchedulerServer interface. @@ -1373,31 +1373,31 @@ func (mr *MockScheduler_SyncProbesServerMockRecorder) SetTrailer(arg0 any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SetTrailer), arg0) } -// MockScheduler_AnnounceCachePeerServer is a mock of Scheduler_AnnounceCachePeerServer interface. -type MockScheduler_AnnounceCachePeerServer struct { +// MockScheduler_AnnouncePersistentCachePeerServer is a mock of Scheduler_AnnouncePersistentCachePeerServer interface. +type MockScheduler_AnnouncePersistentCachePeerServer struct { ctrl *gomock.Controller - recorder *MockScheduler_AnnounceCachePeerServerMockRecorder + recorder *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder } -// MockScheduler_AnnounceCachePeerServerMockRecorder is the mock recorder for MockScheduler_AnnounceCachePeerServer. -type MockScheduler_AnnounceCachePeerServerMockRecorder struct { - mock *MockScheduler_AnnounceCachePeerServer +// MockScheduler_AnnouncePersistentCachePeerServerMockRecorder is the mock recorder for MockScheduler_AnnouncePersistentCachePeerServer. +type MockScheduler_AnnouncePersistentCachePeerServerMockRecorder struct { + mock *MockScheduler_AnnouncePersistentCachePeerServer } -// NewMockScheduler_AnnounceCachePeerServer creates a new mock instance. -func NewMockScheduler_AnnounceCachePeerServer(ctrl *gomock.Controller) *MockScheduler_AnnounceCachePeerServer { - mock := &MockScheduler_AnnounceCachePeerServer{ctrl: ctrl} - mock.recorder = &MockScheduler_AnnounceCachePeerServerMockRecorder{mock} +// NewMockScheduler_AnnouncePersistentCachePeerServer creates a new mock instance. +func NewMockScheduler_AnnouncePersistentCachePeerServer(ctrl *gomock.Controller) *MockScheduler_AnnouncePersistentCachePeerServer { + mock := &MockScheduler_AnnouncePersistentCachePeerServer{ctrl: ctrl} + mock.recorder = &MockScheduler_AnnouncePersistentCachePeerServerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockScheduler_AnnounceCachePeerServer) EXPECT() *MockScheduler_AnnounceCachePeerServerMockRecorder { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) EXPECT() *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder { return m.recorder } // Context mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) Context() context.Context { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) Context() context.Context { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Context") ret0, _ := ret[0].(context.Context) @@ -1405,28 +1405,28 @@ func (m *MockScheduler_AnnounceCachePeerServer) Context() context.Context { } // Context indicates an expected call of Context. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Context() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) Context() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Context)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).Context)) } // Recv mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) Recv() (*scheduler.AnnounceCachePeerRequest, error) { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) Recv() (*scheduler.AnnouncePersistentCachePeerRequest, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Recv") - ret0, _ := ret[0].(*scheduler.AnnounceCachePeerRequest) + ret0, _ := ret[0].(*scheduler.AnnouncePersistentCachePeerRequest) ret1, _ := ret[1].(error) return ret0, ret1 } // Recv indicates an expected call of Recv. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Recv() *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) Recv() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Recv)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).Recv)) } // RecvMsg mocks base method. -func (m_2 *MockScheduler_AnnounceCachePeerServer) RecvMsg(m any) error { +func (m_2 *MockScheduler_AnnouncePersistentCachePeerServer) RecvMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "RecvMsg", m) ret0, _ := ret[0].(error) @@ -1434,13 +1434,13 @@ func (m_2 *MockScheduler_AnnounceCachePeerServer) RecvMsg(m any) error { } // RecvMsg indicates an expected call of RecvMsg. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) RecvMsg(m any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) RecvMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).RecvMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).RecvMsg), m) } // Send mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) Send(arg0 *scheduler.AnnounceCachePeerResponse) error { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) Send(arg0 *scheduler.AnnouncePersistentCachePeerResponse) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) @@ -1448,13 +1448,13 @@ func (m *MockScheduler_AnnounceCachePeerServer) Send(arg0 *scheduler.AnnounceCac } // Send indicates an expected call of Send. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) Send(arg0 any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) Send(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).Send), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).Send), arg0) } // SendHeader mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) SendHeader(arg0 metadata.MD) error { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) SendHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SendHeader", arg0) ret0, _ := ret[0].(error) @@ -1462,13 +1462,13 @@ func (m *MockScheduler_AnnounceCachePeerServer) SendHeader(arg0 metadata.MD) err } // SendHeader indicates an expected call of SendHeader. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SendHeader(arg0 any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) SendHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SendHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).SendHeader), arg0) } // SendMsg mocks base method. -func (m_2 *MockScheduler_AnnounceCachePeerServer) SendMsg(m any) error { +func (m_2 *MockScheduler_AnnouncePersistentCachePeerServer) SendMsg(m any) error { m_2.ctrl.T.Helper() ret := m_2.ctrl.Call(m_2, "SendMsg", m) ret0, _ := ret[0].(error) @@ -1476,13 +1476,13 @@ func (m_2 *MockScheduler_AnnounceCachePeerServer) SendMsg(m any) error { } // SendMsg indicates an expected call of SendMsg. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SendMsg(m any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) SendMsg(m any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SendMsg), m) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).SendMsg), m) } // SetHeader mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) SetHeader(arg0 metadata.MD) error { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) SetHeader(arg0 metadata.MD) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetHeader", arg0) ret0, _ := ret[0].(error) @@ -1490,19 +1490,19 @@ func (m *MockScheduler_AnnounceCachePeerServer) SetHeader(arg0 metadata.MD) erro } // SetHeader indicates an expected call of SetHeader. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SetHeader(arg0 any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) SetHeader(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SetHeader), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).SetHeader), arg0) } // SetTrailer mocks base method. -func (m *MockScheduler_AnnounceCachePeerServer) SetTrailer(arg0 metadata.MD) { +func (m *MockScheduler_AnnouncePersistentCachePeerServer) SetTrailer(arg0 metadata.MD) { m.ctrl.T.Helper() m.ctrl.Call(m, "SetTrailer", arg0) } // SetTrailer indicates an expected call of SetTrailer. -func (mr *MockScheduler_AnnounceCachePeerServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { +func (mr *MockScheduler_AnnouncePersistentCachePeerServerMockRecorder) SetTrailer(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_AnnounceCachePeerServer)(nil).SetTrailer), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_AnnouncePersistentCachePeerServer)(nil).SetTrailer), arg0) }