mocks

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTemplate

func FromTemplate() runtime.Runtime

Types

type Nerv

type Nerv struct {
	Runtime
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Nerv) SetDaemonRunning

func (n *Nerv) SetDaemonRunning(status bool)

func (*Nerv) StartCustomEvent

func (n *Nerv) StartCustomEvent(event *types.WorkloadEventMessage)

func (*Nerv) StartEvents

func (n *Nerv) StartEvents()

StartEvents starts the events: Shinji 400%, Asuka starts, Asuka dies, Rei dies

type Runtime

type Runtime struct {
	mock.Mock
}

Runtime is an autogenerated mock type for the Runtime type

func NewRuntime

func NewRuntime(t interface {
	mock.TestingT
	Cleanup(func())
}) *Runtime

NewRuntime creates a new instance of Runtime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Runtime) AttachWorkload

func (_mock *Runtime) AttachWorkload(ctx context.Context, ID string) (io.Reader, io.Reader, error)

AttachWorkload provides a mock function for the type Runtime

func (*Runtime) CollectWorkloadMetrics

func (_mock *Runtime) CollectWorkloadMetrics(ctx context.Context, ID string)

CollectWorkloadMetrics provides a mock function for the type Runtime

func (*Runtime) EXPECT

func (_m *Runtime) EXPECT() *Runtime_Expecter

func (*Runtime) Events

func (_mock *Runtime) Events(ctx context.Context, filters map[string]string) (<-chan *types.WorkloadEventMessage, <-chan error)

Events provides a mock function for the type Runtime

func (*Runtime) GetStatus

func (_mock *Runtime) GetStatus(ctx context.Context, ID string, checkHealth bool) (*types.WorkloadStatus, error)

GetStatus provides a mock function for the type Runtime

func (*Runtime) GetWorkloadName

func (_mock *Runtime) GetWorkloadName(ctx context.Context, ID string) (string, error)

GetWorkloadName provides a mock function for the type Runtime

func (*Runtime) IsDaemonRunning

func (_mock *Runtime) IsDaemonRunning(ctx context.Context) bool

IsDaemonRunning provides a mock function for the type Runtime

func (*Runtime) ListWorkloadIDs

func (_mock *Runtime) ListWorkloadIDs(ctx context.Context, filters map[string]string) ([]string, error)

ListWorkloadIDs provides a mock function for the type Runtime

func (*Runtime) LogFieldsExtra

func (_mock *Runtime) LogFieldsExtra(ctx context.Context, ID string) (map[string]string, error)

LogFieldsExtra provides a mock function for the type Runtime

type Runtime_AttachWorkload_Call

type Runtime_AttachWorkload_Call struct {
	*mock.Call
}

Runtime_AttachWorkload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AttachWorkload'

func (*Runtime_AttachWorkload_Call) Return

func (*Runtime_AttachWorkload_Call) Run

func (*Runtime_AttachWorkload_Call) RunAndReturn

type Runtime_CollectWorkloadMetrics_Call

type Runtime_CollectWorkloadMetrics_Call struct {
	*mock.Call
}

Runtime_CollectWorkloadMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CollectWorkloadMetrics'

func (*Runtime_CollectWorkloadMetrics_Call) Return

func (*Runtime_CollectWorkloadMetrics_Call) Run

func (*Runtime_CollectWorkloadMetrics_Call) RunAndReturn

type Runtime_Events_Call

type Runtime_Events_Call struct {
	*mock.Call
}

Runtime_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events'

func (*Runtime_Events_Call) Return

func (_c *Runtime_Events_Call) Return(workloadEventMessageCh <-chan *types.WorkloadEventMessage, errCh <-chan error) *Runtime_Events_Call

func (*Runtime_Events_Call) Run

func (_c *Runtime_Events_Call) Run(run func(ctx context.Context, filters map[string]string)) *Runtime_Events_Call

func (*Runtime_Events_Call) RunAndReturn

func (_c *Runtime_Events_Call) RunAndReturn(run func(ctx context.Context, filters map[string]string) (<-chan *types.WorkloadEventMessage, <-chan error)) *Runtime_Events_Call

type Runtime_Expecter

type Runtime_Expecter struct {
	// contains filtered or unexported fields
}

func (*Runtime_Expecter) AttachWorkload

func (_e *Runtime_Expecter) AttachWorkload(ctx any, ID any) *Runtime_AttachWorkload_Call

AttachWorkload is a helper method to define mock.On call

  • ctx context.Context
  • ID string

func (*Runtime_Expecter) CollectWorkloadMetrics

func (_e *Runtime_Expecter) CollectWorkloadMetrics(ctx any, ID any) *Runtime_CollectWorkloadMetrics_Call

CollectWorkloadMetrics is a helper method to define mock.On call

  • ctx context.Context
  • ID string

func (*Runtime_Expecter) Events

func (_e *Runtime_Expecter) Events(ctx any, filters any) *Runtime_Events_Call

Events is a helper method to define mock.On call

  • ctx context.Context
  • filters map[string]string

func (*Runtime_Expecter) GetStatus

func (_e *Runtime_Expecter) GetStatus(ctx any, ID any, checkHealth any) *Runtime_GetStatus_Call

GetStatus is a helper method to define mock.On call

  • ctx context.Context
  • ID string
  • checkHealth bool

func (*Runtime_Expecter) GetWorkloadName

func (_e *Runtime_Expecter) GetWorkloadName(ctx any, ID any) *Runtime_GetWorkloadName_Call

GetWorkloadName is a helper method to define mock.On call

  • ctx context.Context
  • ID string

func (*Runtime_Expecter) IsDaemonRunning

func (_e *Runtime_Expecter) IsDaemonRunning(ctx any) *Runtime_IsDaemonRunning_Call

IsDaemonRunning is a helper method to define mock.On call

  • ctx context.Context

func (*Runtime_Expecter) ListWorkloadIDs

func (_e *Runtime_Expecter) ListWorkloadIDs(ctx any, filters any) *Runtime_ListWorkloadIDs_Call

ListWorkloadIDs is a helper method to define mock.On call

  • ctx context.Context
  • filters map[string]string

func (*Runtime_Expecter) LogFieldsExtra

func (_e *Runtime_Expecter) LogFieldsExtra(ctx any, ID any) *Runtime_LogFieldsExtra_Call

LogFieldsExtra is a helper method to define mock.On call

  • ctx context.Context
  • ID string

type Runtime_GetStatus_Call

type Runtime_GetStatus_Call struct {
	*mock.Call
}

Runtime_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus'

func (*Runtime_GetStatus_Call) Return

func (_c *Runtime_GetStatus_Call) Return(workloadStatus *types.WorkloadStatus, err error) *Runtime_GetStatus_Call

func (*Runtime_GetStatus_Call) Run

func (_c *Runtime_GetStatus_Call) Run(run func(ctx context.Context, ID string, checkHealth bool)) *Runtime_GetStatus_Call

func (*Runtime_GetStatus_Call) RunAndReturn

func (_c *Runtime_GetStatus_Call) RunAndReturn(run func(ctx context.Context, ID string, checkHealth bool) (*types.WorkloadStatus, error)) *Runtime_GetStatus_Call

type Runtime_GetWorkloadName_Call

type Runtime_GetWorkloadName_Call struct {
	*mock.Call
}

Runtime_GetWorkloadName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkloadName'

func (*Runtime_GetWorkloadName_Call) Return

func (*Runtime_GetWorkloadName_Call) Run

func (*Runtime_GetWorkloadName_Call) RunAndReturn

type Runtime_IsDaemonRunning_Call

type Runtime_IsDaemonRunning_Call struct {
	*mock.Call
}

Runtime_IsDaemonRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDaemonRunning'

func (*Runtime_IsDaemonRunning_Call) Return

func (*Runtime_IsDaemonRunning_Call) Run

func (*Runtime_IsDaemonRunning_Call) RunAndReturn

type Runtime_ListWorkloadIDs_Call

type Runtime_ListWorkloadIDs_Call struct {
	*mock.Call
}

Runtime_ListWorkloadIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWorkloadIDs'

func (*Runtime_ListWorkloadIDs_Call) Return

func (*Runtime_ListWorkloadIDs_Call) Run

func (*Runtime_ListWorkloadIDs_Call) RunAndReturn

func (_c *Runtime_ListWorkloadIDs_Call) RunAndReturn(run func(ctx context.Context, filters map[string]string) ([]string, error)) *Runtime_ListWorkloadIDs_Call

type Runtime_LogFieldsExtra_Call

type Runtime_LogFieldsExtra_Call struct {
	*mock.Call
}

Runtime_LogFieldsExtra_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogFieldsExtra'

func (*Runtime_LogFieldsExtra_Call) Return

func (_c *Runtime_LogFieldsExtra_Call) Return(stringToString map[string]string, err error) *Runtime_LogFieldsExtra_Call

func (*Runtime_LogFieldsExtra_Call) Run

func (*Runtime_LogFieldsExtra_Call) RunAndReturn

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL