// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package mocks

import (
	"context"
	"github.com/schmitthub/clawker/internal/controlplane/cpboot"
	"sync"
)

// Ensure, that ManagerMock does implement cpboot.Manager.
// If this is not the case, regenerate this file with moq.
var _ cpboot.Manager = &ManagerMock{}

// ManagerMock is a mock implementation of cpboot.Manager.
//
//	func TestSomethingThatUsesManager(t *testing.T) {
//
//		// make and configure a mocked cpboot.Manager
//		mockedManager := &ManagerMock{
//			EnsureRunningFunc: func(ctx context.Context) error {
//				panic("mock out the EnsureRunning method")
//			},
//			IsRunningFunc: func(ctx context.Context) (bool, error) {
//				panic("mock out the IsRunning method")
//			},
//			ProbeHealthzFunc: func(ctx context.Context) (int, error) {
//				panic("mock out the ProbeHealthz method")
//			},
//			StopFunc: func(ctx context.Context) error {
//				panic("mock out the Stop method")
//			},
//		}
//
//		// use mockedManager in code that requires cpboot.Manager
//		// and then make assertions.
//
//	}
type ManagerMock struct {
	// EnsureRunningFunc mocks the EnsureRunning method.
	EnsureRunningFunc func(ctx context.Context) error

	// IsRunningFunc mocks the IsRunning method.
	IsRunningFunc func(ctx context.Context) (bool, error)

	// ProbeHealthzFunc mocks the ProbeHealthz method.
	ProbeHealthzFunc func(ctx context.Context) (int, error)

	// StopFunc mocks the Stop method.
	StopFunc func(ctx context.Context) error

	// calls tracks calls to the methods.
	calls struct {
		// EnsureRunning holds details about calls to the EnsureRunning method.
		EnsureRunning []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// IsRunning holds details about calls to the IsRunning method.
		IsRunning []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// ProbeHealthz holds details about calls to the ProbeHealthz method.
		ProbeHealthz []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
		// Stop holds details about calls to the Stop method.
		Stop []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
	}
	lockEnsureRunning sync.RWMutex
	lockIsRunning     sync.RWMutex
	lockProbeHealthz  sync.RWMutex
	lockStop          sync.RWMutex
}

// EnsureRunning calls EnsureRunningFunc.
func (mock *ManagerMock) EnsureRunning(ctx context.Context) error {
	if mock.EnsureRunningFunc == nil {
		panic("ManagerMock.EnsureRunningFunc: method is nil but Manager.EnsureRunning was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockEnsureRunning.Lock()
	mock.calls.EnsureRunning = append(mock.calls.EnsureRunning, callInfo)
	mock.lockEnsureRunning.Unlock()
	return mock.EnsureRunningFunc(ctx)
}

// EnsureRunningCalls gets all the calls that were made to EnsureRunning.
// Check the length with:
//
//	len(mockedManager.EnsureRunningCalls())
func (mock *ManagerMock) EnsureRunningCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockEnsureRunning.RLock()
	calls = mock.calls.EnsureRunning
	mock.lockEnsureRunning.RUnlock()
	return calls
}

// IsRunning calls IsRunningFunc.
func (mock *ManagerMock) IsRunning(ctx context.Context) (bool, error) {
	if mock.IsRunningFunc == nil {
		panic("ManagerMock.IsRunningFunc: method is nil but Manager.IsRunning was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockIsRunning.Lock()
	mock.calls.IsRunning = append(mock.calls.IsRunning, callInfo)
	mock.lockIsRunning.Unlock()
	return mock.IsRunningFunc(ctx)
}

// IsRunningCalls gets all the calls that were made to IsRunning.
// Check the length with:
//
//	len(mockedManager.IsRunningCalls())
func (mock *ManagerMock) IsRunningCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockIsRunning.RLock()
	calls = mock.calls.IsRunning
	mock.lockIsRunning.RUnlock()
	return calls
}

// ProbeHealthz calls ProbeHealthzFunc.
func (mock *ManagerMock) ProbeHealthz(ctx context.Context) (int, error) {
	if mock.ProbeHealthzFunc == nil {
		panic("ManagerMock.ProbeHealthzFunc: method is nil but Manager.ProbeHealthz was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockProbeHealthz.Lock()
	mock.calls.ProbeHealthz = append(mock.calls.ProbeHealthz, callInfo)
	mock.lockProbeHealthz.Unlock()
	return mock.ProbeHealthzFunc(ctx)
}

// ProbeHealthzCalls gets all the calls that were made to ProbeHealthz.
// Check the length with:
//
//	len(mockedManager.ProbeHealthzCalls())
func (mock *ManagerMock) ProbeHealthzCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockProbeHealthz.RLock()
	calls = mock.calls.ProbeHealthz
	mock.lockProbeHealthz.RUnlock()
	return calls
}

// Stop calls StopFunc.
func (mock *ManagerMock) Stop(ctx context.Context) error {
	if mock.StopFunc == nil {
		panic("ManagerMock.StopFunc: method is nil but Manager.Stop was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockStop.Lock()
	mock.calls.Stop = append(mock.calls.Stop, callInfo)
	mock.lockStop.Unlock()
	return mock.StopFunc(ctx)
}

// StopCalls gets all the calls that were made to Stop.
// Check the length with:
//
//	len(mockedManager.StopCalls())
func (mock *ManagerMock) StopCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockStop.RLock()
	calls = mock.calls.Stop
	mock.lockStop.RUnlock()
	return calls
}
