// Code generated by MockGen. DO NOT EDIT. // Source: internal/controller/allocator.go // Package controller is a generated GoMock package. package controller import ( context "context" reflect "reflect" v1alpha1 "github.com/alibaba/OpenSandbox/sandbox-k8s/apis/sandbox/v1alpha1" algorithm "github.com/alibaba/OpenSandbox/sandbox-k8s/internal/controller/algorithm" gomock "github.com/golang/mock/gomock" client "sigs.k8s.io/controller-runtime/pkg/client" ) // MockAllocationStore is a mock of AllocationStore interface. type MockAllocationStore struct { ctrl *gomock.Controller recorder *MockAllocationStoreMockRecorder } // MockAllocationStoreMockRecorder is the mock recorder for MockAllocationStore. type MockAllocationStoreMockRecorder struct { mock *MockAllocationStore } // NewMockAllocationStore creates a new mock instance. func NewMockAllocationStore(ctrl *gomock.Controller) *MockAllocationStore { mock := &MockAllocationStore{ctrl: ctrl} mock.recorder = &MockAllocationStoreMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockAllocationStore) EXPECT() *MockAllocationStoreMockRecorder { return m.recorder } // ClearAllocation mocks base method. func (m *MockAllocationStore) ClearAllocation(ctx context.Context, ns, poolName string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ClearAllocation", ctx, ns, poolName) ret0, _ := ret[0].(error) return ret0 } // ClearAllocation indicates an expected call of ClearAllocation. func (mr *MockAllocationStoreMockRecorder) ClearAllocation(ctx, ns, poolName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAllocation", reflect.TypeOf((*MockAllocationStore)(nil).ClearAllocation), ctx, ns, poolName) } // GetAllocation mocks base method. func (m *MockAllocationStore) GetAllocation(ctx context.Context, pool *v1alpha1.Pool) (*PoolAllocation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllocation", ctx, pool) ret0, _ := ret[0].(*PoolAllocation) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAllocation indicates an expected call of GetAllocation. func (mr *MockAllocationStoreMockRecorder) GetAllocation(ctx, pool interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllocation", reflect.TypeOf((*MockAllocationStore)(nil).GetAllocation), ctx, pool) } // Recover mocks base method. func (m *MockAllocationStore) Recover(ctx context.Context, c client.Client) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Recover", ctx, c) ret0, _ := ret[0].(error) return ret0 } // Recover indicates an expected call of Recover. func (mr *MockAllocationStoreMockRecorder) Recover(ctx, c interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recover", reflect.TypeOf((*MockAllocationStore)(nil).Recover), ctx, c) } // ReleaseAllocation mocks base method. func (m *MockAllocationStore) ReleaseAllocation(ctx context.Context, ns, poolName string, pods []string) { m.ctrl.T.Helper() m.ctrl.Call(m, "ReleaseAllocation", ctx, ns, poolName, pods) } // ReleaseAllocation indicates an expected call of ReleaseAllocation. func (mr *MockAllocationStoreMockRecorder) ReleaseAllocation(ctx, ns, poolName, pods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseAllocation", reflect.TypeOf((*MockAllocationStore)(nil).ReleaseAllocation), ctx, ns, poolName, pods) } // ReleaseSandboxAllocation mocks base method. func (m *MockAllocationStore) ReleaseSandboxAllocation(ctx context.Context, ns, poolName, sandboxName string) { m.ctrl.T.Helper() m.ctrl.Call(m, "ReleaseSandboxAllocation", ctx, ns, poolName, sandboxName) } // ReleaseSandboxAllocation indicates an expected call of ReleaseSandboxAllocation. func (mr *MockAllocationStoreMockRecorder) ReleaseSandboxAllocation(ctx, ns, poolName, sandboxName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseSandboxAllocation", reflect.TypeOf((*MockAllocationStore)(nil).ReleaseSandboxAllocation), ctx, ns, poolName, sandboxName) } // SetAllocation mocks base method. func (m *MockAllocationStore) SetAllocation(ctx context.Context, pool *v1alpha1.Pool, allocation *PoolAllocation) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetAllocation", ctx, pool, allocation) ret0, _ := ret[0].(error) return ret0 } // SetAllocation indicates an expected call of SetAllocation. func (mr *MockAllocationStoreMockRecorder) SetAllocation(ctx, pool, allocation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllocation", reflect.TypeOf((*MockAllocationStore)(nil).SetAllocation), ctx, pool, allocation) } // UpdateAllocation mocks base method. func (m *MockAllocationStore) UpdateAllocation(ctx context.Context, ns, poolName, sandboxName string, pods []string) { m.ctrl.T.Helper() m.ctrl.Call(m, "UpdateAllocation", ctx, ns, poolName, sandboxName, pods) } // UpdateAllocation indicates an expected call of UpdateAllocation. func (mr *MockAllocationStoreMockRecorder) UpdateAllocation(ctx, ns, poolName, sandboxName, pods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAllocation", reflect.TypeOf((*MockAllocationStore)(nil).UpdateAllocation), ctx, ns, poolName, sandboxName, pods) } // MockAllocationSyncer is a mock of AllocationSyncer interface. type MockAllocationSyncer struct { ctrl *gomock.Controller recorder *MockAllocationSyncerMockRecorder } // MockAllocationSyncerMockRecorder is the mock recorder for MockAllocationSyncer. type MockAllocationSyncerMockRecorder struct { mock *MockAllocationSyncer } // NewMockAllocationSyncer creates a new mock instance. func NewMockAllocationSyncer(ctrl *gomock.Controller) *MockAllocationSyncer { mock := &MockAllocationSyncer{ctrl: ctrl} mock.recorder = &MockAllocationSyncerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockAllocationSyncer) EXPECT() *MockAllocationSyncerMockRecorder { return m.recorder } // GetAllocation mocks base method. func (m *MockAllocationSyncer) GetAllocation(ctx context.Context, sandbox *v1alpha1.BatchSandbox) (*SandboxAllocation, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetAllocation", ctx, sandbox) ret0, _ := ret[0].(*SandboxAllocation) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAllocation indicates an expected call of GetAllocation. func (mr *MockAllocationSyncerMockRecorder) GetAllocation(ctx, sandbox interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllocation", reflect.TypeOf((*MockAllocationSyncer)(nil).GetAllocation), ctx, sandbox) } // GetRelease mocks base method. func (m *MockAllocationSyncer) GetRelease(ctx context.Context, sandbox *v1alpha1.BatchSandbox) (*AllocationRelease, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetRelease", ctx, sandbox) ret0, _ := ret[0].(*AllocationRelease) ret1, _ := ret[1].(error) return ret0, ret1 } // GetRelease indicates an expected call of GetRelease. func (mr *MockAllocationSyncerMockRecorder) GetRelease(ctx, sandbox interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRelease", reflect.TypeOf((*MockAllocationSyncer)(nil).GetRelease), ctx, sandbox) } // GetReleased mocks base method. func (m *MockAllocationSyncer) GetReleased(ctx context.Context, sandbox *v1alpha1.BatchSandbox) (*AllocationReleased, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetReleased", ctx, sandbox) ret0, _ := ret[0].(*AllocationReleased) ret1, _ := ret[1].(error) return ret0, ret1 } // GetReleased indicates an expected call of GetReleased. func (mr *MockAllocationSyncerMockRecorder) GetReleased(ctx, sandbox interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReleased", reflect.TypeOf((*MockAllocationSyncer)(nil).GetReleased), ctx, sandbox) } // SetAllocation mocks base method. func (m *MockAllocationSyncer) SetAllocation(ctx context.Context, sandbox *v1alpha1.BatchSandbox, allocation *SandboxAllocation) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetAllocation", ctx, sandbox, allocation) ret0, _ := ret[0].(error) return ret0 } // SetAllocation indicates an expected call of SetAllocation. func (mr *MockAllocationSyncerMockRecorder) SetAllocation(ctx, sandbox, allocation interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllocation", reflect.TypeOf((*MockAllocationSyncer)(nil).SetAllocation), ctx, sandbox, allocation) } // SetReleased mocks base method. func (m *MockAllocationSyncer) SetReleased(ctx context.Context, sandbox *v1alpha1.BatchSandbox, released *AllocationReleased) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SetReleased", ctx, sandbox, released) ret0, _ := ret[0].(error) return ret0 } // SetReleased indicates an expected call of SetReleased. func (mr *MockAllocationSyncerMockRecorder) SetReleased(ctx, sandbox, released interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReleased", reflect.TypeOf((*MockAllocationSyncer)(nil).SetReleased), ctx, sandbox, released) } // MockAllocator is a mock of Allocator interface. type MockAllocator struct { ctrl *gomock.Controller recorder *MockAllocatorMockRecorder } // MockAllocatorMockRecorder is the mock recorder for MockAllocator. type MockAllocatorMockRecorder struct { mock *MockAllocator } // NewMockAllocator creates a new mock instance. func NewMockAllocator(ctrl *gomock.Controller) *MockAllocator { mock := &MockAllocator{ctrl: ctrl} mock.recorder = &MockAllocatorMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockAllocator) EXPECT() *MockAllocatorMockRecorder { return m.recorder } // ClearPoolAllocation mocks base method. func (m *MockAllocator) ClearPoolAllocation(ctx context.Context, ns, poolName string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ClearPoolAllocation", ctx, ns, poolName) ret0, _ := ret[0].(error) return ret0 } // ClearPoolAllocation indicates an expected call of ClearPoolAllocation. func (mr *MockAllocatorMockRecorder) ClearPoolAllocation(ctx, ns, poolName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearPoolAllocation", reflect.TypeOf((*MockAllocator)(nil).ClearPoolAllocation), ctx, ns, poolName) } // GetPoolAllocation mocks base method. func (m *MockAllocator) GetPoolAllocation(ctx context.Context, pool *v1alpha1.Pool) (map[string]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPoolAllocation", ctx, pool) ret0, _ := ret[0].(map[string]string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetPoolAllocation indicates an expected call of GetPoolAllocation. func (mr *MockAllocatorMockRecorder) GetPoolAllocation(ctx, pool interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPoolAllocation", reflect.TypeOf((*MockAllocator)(nil).GetPoolAllocation), ctx, pool) } // GetSandboxAllocation mocks base method. func (m *MockAllocator) GetSandboxAllocation(ctx context.Context, sandbox *v1alpha1.BatchSandbox) ([]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetSandboxAllocation", ctx, sandbox) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSandboxAllocation indicates an expected call of GetSandboxAllocation. func (mr *MockAllocatorMockRecorder) GetSandboxAllocation(ctx, sandbox interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSandboxAllocation", reflect.TypeOf((*MockAllocator)(nil).GetSandboxAllocation), ctx, sandbox) } // GetSandboxReleased mocks base method. func (m *MockAllocator) GetSandboxReleased(ctx context.Context, sandbox *v1alpha1.BatchSandbox) ([]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetSandboxReleased", ctx, sandbox) ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSandboxReleased indicates an expected call of GetSandboxReleased. func (mr *MockAllocatorMockRecorder) GetSandboxReleased(ctx, sandbox interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSandboxReleased", reflect.TypeOf((*MockAllocator)(nil).GetSandboxReleased), ctx, sandbox) } // ReleasePodsAllocation mocks base method. func (m *MockAllocator) ReleasePodsAllocation(ctx context.Context, ns, poolName string, pods []string) { m.ctrl.T.Helper() m.ctrl.Call(m, "ReleasePodsAllocation", ctx, ns, poolName, pods) } // ReleasePodsAllocation indicates an expected call of ReleasePodsAllocation. func (mr *MockAllocatorMockRecorder) ReleasePodsAllocation(ctx, ns, poolName, pods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleasePodsAllocation", reflect.TypeOf((*MockAllocator)(nil).ReleasePodsAllocation), ctx, ns, poolName, pods) } // Schedule mocks base method. func (m *MockAllocator) Schedule(ctx context.Context, spec *AllocSpec) (*algorithm.AllocAction, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Schedule", ctx, spec) ret0, _ := ret[0].(*algorithm.AllocAction) ret1, _ := ret[1].(error) return ret0, ret1 } // Schedule indicates an expected call of Schedule. func (mr *MockAllocatorMockRecorder) Schedule(ctx, spec interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schedule", reflect.TypeOf((*MockAllocator)(nil).Schedule), ctx, spec) } // SyncSandboxAllocation mocks base method. func (m *MockAllocator) SyncSandboxAllocation(ctx context.Context, sandbox *v1alpha1.BatchSandbox, pods []string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SyncSandboxAllocation", ctx, sandbox, pods) ret0, _ := ret[0].(error) return ret0 } // SyncSandboxAllocation indicates an expected call of SyncSandboxAllocation. func (mr *MockAllocatorMockRecorder) SyncSandboxAllocation(ctx, sandbox, pods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncSandboxAllocation", reflect.TypeOf((*MockAllocator)(nil).SyncSandboxAllocation), ctx, sandbox, pods) } // SyncSandboxReleased mocks base method. func (m *MockAllocator) SyncSandboxReleased(ctx context.Context, sandbox *v1alpha1.BatchSandbox, pods []string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SyncSandboxReleased", ctx, sandbox, pods) ret0, _ := ret[0].(error) return ret0 } // SyncSandboxReleased indicates an expected call of SyncSandboxReleased. func (mr *MockAllocatorMockRecorder) SyncSandboxReleased(ctx, sandbox, pods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncSandboxReleased", reflect.TypeOf((*MockAllocator)(nil).SyncSandboxReleased), ctx, sandbox, pods) }