Documentation ¶
Overview ¶
Package testutils contains helper code for testing startstopper.
Index ¶
- type MockMap
- func (m *MockMap) AddAndStart(ctx context.Context, key string, ss startstopper.StartStopper) (bool, error)
- func (m *MockMap) DeleteAndStop(ctx context.Context, key string) (bool, error)
- func (m *MockMap) ForEach(f func(key string, ss startstopper.StartStopper))
- func (m *MockMap) Get(key string) (startstopper.StartStopper, bool)
- func (m *MockMap) Len() int
- func (m *MockMap) UpdateAndRestart(ctx context.Context, key string, ss startstopper.StartStopper) (bool, error)
- type MockRunner
- type MockStartStopper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockMap ¶
MockMap is a mocked Map.
func (*MockMap) AddAndStart ¶
func (m *MockMap) AddAndStart(ctx context.Context, key string, ss startstopper.StartStopper) (bool, error)
AddAndStart implements interface.
func (*MockMap) DeleteAndStop ¶
DeleteAndStop implements interface.
func (*MockMap) ForEach ¶
func (m *MockMap) ForEach(f func(key string, ss startstopper.StartStopper))
ForEach implements interface.
func (*MockMap) Get ¶
func (m *MockMap) Get(key string) (startstopper.StartStopper, bool)
Get implements interface.
func (*MockMap) UpdateAndRestart ¶
func (m *MockMap) UpdateAndRestart(ctx context.Context, key string, ss startstopper.StartStopper) (bool, error)
UpdateAndRestart implements interface.
type MockRunner ¶
MockRunner is a mocked Runner.
type MockStartStopper ¶
MockStartStopper is a mocked StartStopper.
func (*MockStartStopper) Done ¶
func (m *MockStartStopper) Done() <-chan struct{}
Done implements interface.
func (*MockStartStopper) Err ¶
func (m *MockStartStopper) Err(ctx context.Context) error
Err implements interface.
Click to show internal directories.
Click to hide internal directories.