130 lines
4.1 KiB
Go
130 lines
4.1 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: host_manager.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -destination host_manager_mock.go -source host_manager.go -package persistentcache
|
|
//
|
|
|
|
// Package persistentcache is a generated GoMock package.
|
|
package persistentcache
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
set "d7y.io/dragonfly/v2/pkg/container/set"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockHostManager is a mock of HostManager interface.
|
|
type MockHostManager struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockHostManagerMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockHostManagerMockRecorder is the mock recorder for MockHostManager.
|
|
type MockHostManagerMockRecorder struct {
|
|
mock *MockHostManager
|
|
}
|
|
|
|
// NewMockHostManager creates a new mock instance.
|
|
func NewMockHostManager(ctrl *gomock.Controller) *MockHostManager {
|
|
mock := &MockHostManager{ctrl: ctrl}
|
|
mock.recorder = &MockHostManagerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockHostManager) EXPECT() *MockHostManagerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Delete mocks base method.
|
|
func (m *MockHostManager) Delete(arg0 context.Context, arg1 string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Delete indicates an expected call of Delete.
|
|
func (mr *MockHostManagerMockRecorder) Delete(arg0, arg1 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockHostManager)(nil).Delete), arg0, arg1)
|
|
}
|
|
|
|
// Load mocks base method.
|
|
func (m *MockHostManager) Load(arg0 context.Context, arg1 string) (*Host, bool) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Load", arg0, arg1)
|
|
ret0, _ := ret[0].(*Host)
|
|
ret1, _ := ret[1].(bool)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Load indicates an expected call of Load.
|
|
func (mr *MockHostManagerMockRecorder) Load(arg0, arg1 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Load", reflect.TypeOf((*MockHostManager)(nil).Load), arg0, arg1)
|
|
}
|
|
|
|
// LoadAll mocks base method.
|
|
func (m *MockHostManager) LoadAll(arg0 context.Context) ([]*Host, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LoadAll", arg0)
|
|
ret0, _ := ret[0].([]*Host)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// LoadAll indicates an expected call of LoadAll.
|
|
func (mr *MockHostManagerMockRecorder) LoadAll(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadAll", reflect.TypeOf((*MockHostManager)(nil).LoadAll), arg0)
|
|
}
|
|
|
|
// LoadRandom mocks base method.
|
|
func (m *MockHostManager) LoadRandom(arg0 context.Context, arg1 int, arg2 set.SafeSet[string]) ([]*Host, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "LoadRandom", arg0, arg1, arg2)
|
|
ret0, _ := ret[0].([]*Host)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// LoadRandom indicates an expected call of LoadRandom.
|
|
func (mr *MockHostManagerMockRecorder) LoadRandom(arg0, arg1, arg2 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadRandom", reflect.TypeOf((*MockHostManager)(nil).LoadRandom), arg0, arg1, arg2)
|
|
}
|
|
|
|
// RunGC mocks base method.
|
|
func (m *MockHostManager) RunGC(arg0 context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RunGC", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RunGC indicates an expected call of RunGC.
|
|
func (mr *MockHostManagerMockRecorder) RunGC(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunGC", reflect.TypeOf((*MockHostManager)(nil).RunGC), arg0)
|
|
}
|
|
|
|
// Store mocks base method.
|
|
func (m *MockHostManager) Store(arg0 context.Context, arg1 *Host) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Store", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Store indicates an expected call of Store.
|
|
func (mr *MockHostManagerMockRecorder) Store(arg0, arg1 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockHostManager)(nil).Store), arg0, arg1)
|
|
}
|