Documentation
¶
Index ¶
- func FromTemplate() source.Source
- type Nerv
- type Source
- func (_mock *Source) Alive(ctx context.Context) bool
- func (_m *Source) EXPECT() *Source_Expecter
- func (_mock *Source) Events(ctx context.Context) (<-chan *types.WorkloadEventMessage, <-chan error)
- func (_mock *Source) Get(ctx context.Context, ID string) (*source.Workload, error)
- func (_mock *Source) List(ctx context.Context) ([]*source.Workload, error)
- type Source_Alive_Call
- type Source_Events_Call
- type Source_Expecter
- type Source_Get_Call
- func (_c *Source_Get_Call) Return(workload *source.Workload, err error) *Source_Get_Call
- func (_c *Source_Get_Call) Run(run func(ctx context.Context, ID string)) *Source_Get_Call
- func (_c *Source_Get_Call) RunAndReturn(run func(ctx context.Context, ID string) (*source.Workload, error)) *Source_Get_Call
- type Source_List_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 Source ¶
Source is an autogenerated mock type for the Source type
func NewSource ¶
NewSource creates a new instance of Source. 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 (*Source) EXPECT ¶
func (_m *Source) EXPECT() *Source_Expecter
type Source_Alive_Call ¶
Source_Alive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Alive'
func (*Source_Alive_Call) Return ¶
func (_c *Source_Alive_Call) Return(b bool) *Source_Alive_Call
func (*Source_Alive_Call) Run ¶
func (_c *Source_Alive_Call) Run(run func(ctx context.Context)) *Source_Alive_Call
func (*Source_Alive_Call) RunAndReturn ¶
func (_c *Source_Alive_Call) RunAndReturn(run func(ctx context.Context) bool) *Source_Alive_Call
type Source_Events_Call ¶
Source_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events'
func (*Source_Events_Call) Return ¶
func (_c *Source_Events_Call) Return(workloadEventMessageCh <-chan *types.WorkloadEventMessage, errCh <-chan error) *Source_Events_Call
func (*Source_Events_Call) Run ¶
func (_c *Source_Events_Call) Run(run func(ctx context.Context)) *Source_Events_Call
func (*Source_Events_Call) RunAndReturn ¶
func (_c *Source_Events_Call) RunAndReturn(run func(ctx context.Context) (<-chan *types.WorkloadEventMessage, <-chan error)) *Source_Events_Call
type Source_Expecter ¶
type Source_Expecter struct {
// contains filtered or unexported fields
}
func (*Source_Expecter) Alive ¶
func (_e *Source_Expecter) Alive(ctx any) *Source_Alive_Call
Alive is a helper method to define mock.On call
- ctx context.Context
func (*Source_Expecter) Events ¶
func (_e *Source_Expecter) Events(ctx any) *Source_Events_Call
Events is a helper method to define mock.On call
- ctx context.Context
func (*Source_Expecter) Get ¶
func (_e *Source_Expecter) Get(ctx any, ID any) *Source_Get_Call
Get is a helper method to define mock.On call
- ctx context.Context
- ID string
func (*Source_Expecter) List ¶
func (_e *Source_Expecter) List(ctx any) *Source_List_Call
List is a helper method to define mock.On call
- ctx context.Context
type Source_Get_Call ¶
Source_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
func (*Source_Get_Call) Return ¶
func (_c *Source_Get_Call) Return(workload *source.Workload, err error) *Source_Get_Call
func (*Source_Get_Call) Run ¶
func (_c *Source_Get_Call) Run(run func(ctx context.Context, ID string)) *Source_Get_Call
func (*Source_Get_Call) RunAndReturn ¶
func (_c *Source_Get_Call) RunAndReturn(run func(ctx context.Context, ID string) (*source.Workload, error)) *Source_Get_Call
type Source_List_Call ¶
Source_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*Source_List_Call) Return ¶
func (_c *Source_List_Call) Return(workloads []*source.Workload, err error) *Source_List_Call
func (*Source_List_Call) Run ¶
func (_c *Source_List_Call) Run(run func(ctx context.Context)) *Source_List_Call
func (*Source_List_Call) RunAndReturn ¶
func (_c *Source_List_Call) RunAndReturn(run func(ctx context.Context) ([]*source.Workload, error)) *Source_List_Call