Documentation
¶
Index ¶
- func FromTemplate() runtime.Runtime
- type Nerv
- type Runtime
- func (_mock *Runtime) AttachWorkload(ctx context.Context, ID string) (io.Reader, io.Reader, error)
- func (_mock *Runtime) CollectWorkloadMetrics(ctx context.Context, ID string)
- func (_m *Runtime) EXPECT() *Runtime_Expecter
- func (_mock *Runtime) Events(ctx context.Context, filters map[string]string) (<-chan *types.WorkloadEventMessage, <-chan error)
- func (_mock *Runtime) GetStatus(ctx context.Context, ID string, checkHealth bool) (*types.WorkloadStatus, error)
- func (_mock *Runtime) GetWorkloadName(ctx context.Context, ID string) (string, error)
- func (_mock *Runtime) IsDaemonRunning(ctx context.Context) bool
- func (_mock *Runtime) ListWorkloadIDs(ctx context.Context, filters map[string]string) ([]string, error)
- func (_mock *Runtime) LogFieldsExtra(ctx context.Context, ID string) (map[string]string, error)
- type Runtime_AttachWorkload_Call
- func (_c *Runtime_AttachWorkload_Call) Return(reader io.Reader, reader1 io.Reader, err error) *Runtime_AttachWorkload_Call
- func (_c *Runtime_AttachWorkload_Call) Run(run func(ctx context.Context, ID string)) *Runtime_AttachWorkload_Call
- func (_c *Runtime_AttachWorkload_Call) RunAndReturn(run func(ctx context.Context, ID string) (io.Reader, io.Reader, error)) *Runtime_AttachWorkload_Call
- type Runtime_CollectWorkloadMetrics_Call
- func (_c *Runtime_CollectWorkloadMetrics_Call) Return() *Runtime_CollectWorkloadMetrics_Call
- func (_c *Runtime_CollectWorkloadMetrics_Call) Run(run func(ctx context.Context, ID string)) *Runtime_CollectWorkloadMetrics_Call
- func (_c *Runtime_CollectWorkloadMetrics_Call) RunAndReturn(run func(ctx context.Context, ID string)) *Runtime_CollectWorkloadMetrics_Call
- type Runtime_Events_Call
- func (_c *Runtime_Events_Call) Return(workloadEventMessageCh <-chan *types.WorkloadEventMessage, errCh <-chan error) *Runtime_Events_Call
- func (_c *Runtime_Events_Call) Run(run func(ctx context.Context, filters map[string]string)) *Runtime_Events_Call
- func (_c *Runtime_Events_Call) RunAndReturn(...) *Runtime_Events_Call
- type Runtime_Expecter
- func (_e *Runtime_Expecter) AttachWorkload(ctx any, ID any) *Runtime_AttachWorkload_Call
- func (_e *Runtime_Expecter) CollectWorkloadMetrics(ctx any, ID any) *Runtime_CollectWorkloadMetrics_Call
- func (_e *Runtime_Expecter) Events(ctx any, filters any) *Runtime_Events_Call
- func (_e *Runtime_Expecter) GetStatus(ctx any, ID any, checkHealth any) *Runtime_GetStatus_Call
- func (_e *Runtime_Expecter) GetWorkloadName(ctx any, ID any) *Runtime_GetWorkloadName_Call
- func (_e *Runtime_Expecter) IsDaemonRunning(ctx any) *Runtime_IsDaemonRunning_Call
- func (_e *Runtime_Expecter) ListWorkloadIDs(ctx any, filters any) *Runtime_ListWorkloadIDs_Call
- func (_e *Runtime_Expecter) LogFieldsExtra(ctx any, ID any) *Runtime_LogFieldsExtra_Call
- type Runtime_GetStatus_Call
- func (_c *Runtime_GetStatus_Call) Return(workloadStatus *types.WorkloadStatus, err error) *Runtime_GetStatus_Call
- func (_c *Runtime_GetStatus_Call) Run(run func(ctx context.Context, ID string, checkHealth bool)) *Runtime_GetStatus_Call
- func (_c *Runtime_GetStatus_Call) RunAndReturn(...) *Runtime_GetStatus_Call
- type Runtime_GetWorkloadName_Call
- func (_c *Runtime_GetWorkloadName_Call) Return(s string, err error) *Runtime_GetWorkloadName_Call
- func (_c *Runtime_GetWorkloadName_Call) Run(run func(ctx context.Context, ID string)) *Runtime_GetWorkloadName_Call
- func (_c *Runtime_GetWorkloadName_Call) RunAndReturn(run func(ctx context.Context, ID string) (string, error)) *Runtime_GetWorkloadName_Call
- type Runtime_IsDaemonRunning_Call
- func (_c *Runtime_IsDaemonRunning_Call) Return(b bool) *Runtime_IsDaemonRunning_Call
- func (_c *Runtime_IsDaemonRunning_Call) Run(run func(ctx context.Context)) *Runtime_IsDaemonRunning_Call
- func (_c *Runtime_IsDaemonRunning_Call) RunAndReturn(run func(ctx context.Context) bool) *Runtime_IsDaemonRunning_Call
- type Runtime_ListWorkloadIDs_Call
- func (_c *Runtime_ListWorkloadIDs_Call) Return(strings []string, err error) *Runtime_ListWorkloadIDs_Call
- func (_c *Runtime_ListWorkloadIDs_Call) Run(run func(ctx context.Context, filters map[string]string)) *Runtime_ListWorkloadIDs_Call
- func (_c *Runtime_ListWorkloadIDs_Call) RunAndReturn(run func(ctx context.Context, filters map[string]string) ([]string, error)) *Runtime_ListWorkloadIDs_Call
- type Runtime_LogFieldsExtra_Call
- func (_c *Runtime_LogFieldsExtra_Call) Return(stringToString map[string]string, err error) *Runtime_LogFieldsExtra_Call
- func (_c *Runtime_LogFieldsExtra_Call) Run(run func(ctx context.Context, ID string)) *Runtime_LogFieldsExtra_Call
- func (_c *Runtime_LogFieldsExtra_Call) RunAndReturn(run func(ctx context.Context, ID string) (map[string]string, error)) *Runtime_LogFieldsExtra_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromTemplate ¶
Types ¶
type Nerv ¶
func (*Nerv) SetDaemonRunning ¶
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 ¶
Runtime is an autogenerated mock type for the Runtime type
func NewRuntime ¶
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 ¶
AttachWorkload provides a mock function for the type Runtime
func (*Runtime) CollectWorkloadMetrics ¶
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 ¶
GetWorkloadName provides a mock function for the type Runtime
func (*Runtime) IsDaemonRunning ¶
IsDaemonRunning provides a mock function for the type Runtime
type Runtime_AttachWorkload_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 (_c *Runtime_AttachWorkload_Call) Return(reader io.Reader, reader1 io.Reader, err error) *Runtime_AttachWorkload_Call
func (*Runtime_AttachWorkload_Call) Run ¶
func (_c *Runtime_AttachWorkload_Call) Run(run func(ctx context.Context, ID string)) *Runtime_AttachWorkload_Call
func (*Runtime_AttachWorkload_Call) RunAndReturn ¶
func (_c *Runtime_AttachWorkload_Call) RunAndReturn(run func(ctx context.Context, ID string) (io.Reader, io.Reader, error)) *Runtime_AttachWorkload_Call
type Runtime_CollectWorkloadMetrics_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 (_c *Runtime_CollectWorkloadMetrics_Call) Return() *Runtime_CollectWorkloadMetrics_Call
func (*Runtime_CollectWorkloadMetrics_Call) Run ¶
func (_c *Runtime_CollectWorkloadMetrics_Call) Run(run func(ctx context.Context, ID string)) *Runtime_CollectWorkloadMetrics_Call
func (*Runtime_CollectWorkloadMetrics_Call) RunAndReturn ¶
func (_c *Runtime_CollectWorkloadMetrics_Call) RunAndReturn(run func(ctx context.Context, ID string)) *Runtime_CollectWorkloadMetrics_Call
type Runtime_Events_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 ¶
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 ¶
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 (_c *Runtime_GetWorkloadName_Call) Return(s string, err error) *Runtime_GetWorkloadName_Call
func (*Runtime_GetWorkloadName_Call) Run ¶
func (_c *Runtime_GetWorkloadName_Call) Run(run func(ctx context.Context, ID string)) *Runtime_GetWorkloadName_Call
func (*Runtime_GetWorkloadName_Call) RunAndReturn ¶
func (_c *Runtime_GetWorkloadName_Call) RunAndReturn(run func(ctx context.Context, ID string) (string, error)) *Runtime_GetWorkloadName_Call
type Runtime_IsDaemonRunning_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 (_c *Runtime_IsDaemonRunning_Call) Return(b bool) *Runtime_IsDaemonRunning_Call
func (*Runtime_IsDaemonRunning_Call) Run ¶
func (_c *Runtime_IsDaemonRunning_Call) Run(run func(ctx context.Context)) *Runtime_IsDaemonRunning_Call
func (*Runtime_IsDaemonRunning_Call) RunAndReturn ¶
func (_c *Runtime_IsDaemonRunning_Call) RunAndReturn(run func(ctx context.Context) bool) *Runtime_IsDaemonRunning_Call
type Runtime_ListWorkloadIDs_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 (_c *Runtime_ListWorkloadIDs_Call) Return(strings []string, err error) *Runtime_ListWorkloadIDs_Call
func (*Runtime_ListWorkloadIDs_Call) Run ¶
func (_c *Runtime_ListWorkloadIDs_Call) Run(run func(ctx context.Context, filters map[string]string)) *Runtime_ListWorkloadIDs_Call
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 ¶
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 (_c *Runtime_LogFieldsExtra_Call) Run(run func(ctx context.Context, ID string)) *Runtime_LogFieldsExtra_Call
func (*Runtime_LogFieldsExtra_Call) RunAndReturn ¶
func (_c *Runtime_LogFieldsExtra_Call) RunAndReturn(run func(ctx context.Context, ID string) (map[string]string, error)) *Runtime_LogFieldsExtra_Call