// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/cmd/agent (interfaces: Runner,LeaderElector)
//
// Generated by this command:
//
//	mockgen -typed -destination mock_for_test.go -package agent gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/cmd/agent Runner,LeaderElector
//

// Package agent is a generated GoMock package.
package agent

import (
	context "context"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
)

// MockRunner is a mock of Runner interface.
type MockRunner struct {
	ctrl     *gomock.Controller
	recorder *MockRunnerMockRecorder
	isgomock struct{}
}

// MockRunnerMockRecorder is the mock recorder for MockRunner.
type MockRunnerMockRecorder struct {
	mock *MockRunner
}

// NewMockRunner creates a new mock instance.
func NewMockRunner(ctrl *gomock.Controller) *MockRunner {
	mock := &MockRunner{ctrl: ctrl}
	mock.recorder = &MockRunnerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRunner) EXPECT() *MockRunnerMockRecorder {
	return m.recorder
}

// RunWhenLeader mocks base method.
func (m *MockRunner) RunWhenLeader(ctx context.Context, startFn ModuleStartFunc, stopFunc ModuleStopFunc) (CancelRunWhenLeaderFunc, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RunWhenLeader", ctx, startFn, stopFunc)
	ret0, _ := ret[0].(CancelRunWhenLeaderFunc)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// RunWhenLeader indicates an expected call of RunWhenLeader.
func (mr *MockRunnerMockRecorder) RunWhenLeader(ctx, startFn, stopFunc any) *MockRunnerRunWhenLeaderCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunWhenLeader", reflect.TypeOf((*MockRunner)(nil).RunWhenLeader), ctx, startFn, stopFunc)
	return &MockRunnerRunWhenLeaderCall{Call: call}
}

// MockRunnerRunWhenLeaderCall wrap *gomock.Call
type MockRunnerRunWhenLeaderCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockRunnerRunWhenLeaderCall) Return(arg0 CancelRunWhenLeaderFunc, arg1 error) *MockRunnerRunWhenLeaderCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockRunnerRunWhenLeaderCall) Do(f func(context.Context, ModuleStartFunc, ModuleStopFunc) (CancelRunWhenLeaderFunc, error)) *MockRunnerRunWhenLeaderCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockRunnerRunWhenLeaderCall) DoAndReturn(f func(context.Context, ModuleStartFunc, ModuleStopFunc) (CancelRunWhenLeaderFunc, error)) *MockRunnerRunWhenLeaderCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// MockLeaderElector is a mock of LeaderElector interface.
type MockLeaderElector struct {
	ctrl     *gomock.Controller
	recorder *MockLeaderElectorMockRecorder
	isgomock struct{}
}

// MockLeaderElectorMockRecorder is the mock recorder for MockLeaderElector.
type MockLeaderElectorMockRecorder struct {
	mock *MockLeaderElector
}

// NewMockLeaderElector creates a new mock instance.
func NewMockLeaderElector(ctrl *gomock.Controller) *MockLeaderElector {
	mock := &MockLeaderElector{ctrl: ctrl}
	mock.recorder = &MockLeaderElectorMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLeaderElector) EXPECT() *MockLeaderElectorMockRecorder {
	return m.recorder
}

// Run mocks base method.
func (m *MockLeaderElector) Run(ctx context.Context, onStartedLeading, onStoppedLeading func()) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Run", ctx, onStartedLeading, onStoppedLeading)
}

// Run indicates an expected call of Run.
func (mr *MockLeaderElectorMockRecorder) Run(ctx, onStartedLeading, onStoppedLeading any) *MockLeaderElectorRunCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockLeaderElector)(nil).Run), ctx, onStartedLeading, onStoppedLeading)
	return &MockLeaderElectorRunCall{Call: call}
}

// MockLeaderElectorRunCall wrap *gomock.Call
type MockLeaderElectorRunCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockLeaderElectorRunCall) Return() *MockLeaderElectorRunCall {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockLeaderElectorRunCall) Do(f func(context.Context, func(), func())) *MockLeaderElectorRunCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockLeaderElectorRunCall) DoAndReturn(f func(context.Context, func(), func())) *MockLeaderElectorRunCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
