Documentation
¶
Index ¶
- func NewFakeStore() store.Store
- type MockStore
- func (m *MockStore) GetMockNodeStatus(nodename string) *types.NodeStatus
- func (m *MockStore) GetMockWorkloadStatus(ID string) *types.WorkloadStatus
- func (m *MockStore) ListRunningWorkloadIDs(context.Context) ([]string, error)
- func (m *MockStore) Own(IDs ...string)
- func (m *MockStore) WorkloadExists(_ context.Context, ID string) (bool, error)
- type Store
- func (_m *Store) EXPECT() *Store_Expecter
- func (_mock *Store) GetIdentifier(ctx context.Context) string
- func (_mock *Store) GetNode(ctx context.Context, nodename string) (*types.Node, error)
- func (_mock *Store) ListRunningWorkloadIDs(ctx context.Context) ([]string, error)
- func (_mock *Store) SetNodeStatus(ctx context.Context, ttl int64) error
- func (_mock *Store) SetWorkloadStatus(ctx context.Context, status *types.WorkloadStatus) error
- type Store_Expecter
- func (_e *Store_Expecter) GetIdentifier(ctx any) *Store_GetIdentifier_Call
- func (_e *Store_Expecter) GetNode(ctx any, nodename any) *Store_GetNode_Call
- func (_e *Store_Expecter) ListRunningWorkloadIDs(ctx any) *Store_ListRunningWorkloadIDs_Call
- func (_e *Store_Expecter) SetNodeStatus(ctx any, ttl any) *Store_SetNodeStatus_Call
- func (_e *Store_Expecter) SetWorkloadStatus(ctx any, status any) *Store_SetWorkloadStatus_Call
- type Store_GetIdentifier_Call
- type Store_GetNode_Call
- func (_c *Store_GetNode_Call) Return(node *types.Node, err error) *Store_GetNode_Call
- func (_c *Store_GetNode_Call) Run(run func(ctx context.Context, nodename string)) *Store_GetNode_Call
- func (_c *Store_GetNode_Call) RunAndReturn(run func(ctx context.Context, nodename string) (*types.Node, error)) *Store_GetNode_Call
- type Store_ListRunningWorkloadIDs_Call
- func (_c *Store_ListRunningWorkloadIDs_Call) Return(strings []string, err error) *Store_ListRunningWorkloadIDs_Call
- func (_c *Store_ListRunningWorkloadIDs_Call) Run(run func(ctx context.Context)) *Store_ListRunningWorkloadIDs_Call
- func (_c *Store_ListRunningWorkloadIDs_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *Store_ListRunningWorkloadIDs_Call
- type Store_SetNodeStatus_Call
- func (_c *Store_SetNodeStatus_Call) Return(err error) *Store_SetNodeStatus_Call
- func (_c *Store_SetNodeStatus_Call) Run(run func(ctx context.Context, ttl int64)) *Store_SetNodeStatus_Call
- func (_c *Store_SetNodeStatus_Call) RunAndReturn(run func(ctx context.Context, ttl int64) error) *Store_SetNodeStatus_Call
- type Store_SetWorkloadStatus_Call
- func (_c *Store_SetWorkloadStatus_Call) Return(err error) *Store_SetWorkloadStatus_Call
- func (_c *Store_SetWorkloadStatus_Call) Run(run func(ctx context.Context, status *types.WorkloadStatus)) *Store_SetWorkloadStatus_Call
- func (_c *Store_SetWorkloadStatus_Call) RunAndReturn(run func(ctx context.Context, status *types.WorkloadStatus) error) *Store_SetWorkloadStatus_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFakeStore ¶
Types ¶
type MockStore ¶
func (*MockStore) GetMockNodeStatus ¶ added in v0.1.1
func (m *MockStore) GetMockNodeStatus(nodename string) *types.NodeStatus
func (*MockStore) GetMockWorkloadStatus ¶
func (m *MockStore) GetMockWorkloadStatus(ID string) *types.WorkloadStatus
func (*MockStore) ListRunningWorkloadIDs ¶ added in v0.1.1
type Store ¶
Store is an autogenerated mock type for the Store type
func NewStore ¶
NewStore creates a new instance of Store. 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 (*Store) EXPECT ¶
func (_m *Store) EXPECT() *Store_Expecter
func (*Store) GetIdentifier ¶
GetIdentifier provides a mock function for the type Store
func (*Store) ListRunningWorkloadIDs ¶ added in v0.1.1
ListRunningWorkloadIDs provides a mock function for the type Store
func (*Store) SetNodeStatus ¶
SetNodeStatus provides a mock function for the type Store
func (*Store) SetWorkloadStatus ¶
SetWorkloadStatus provides a mock function for the type Store
type Store_Expecter ¶
type Store_Expecter struct {
// contains filtered or unexported fields
}
func (*Store_Expecter) GetIdentifier ¶
func (_e *Store_Expecter) GetIdentifier(ctx any) *Store_GetIdentifier_Call
GetIdentifier is a helper method to define mock.On call
- ctx context.Context
func (*Store_Expecter) GetNode ¶
func (_e *Store_Expecter) GetNode(ctx any, nodename any) *Store_GetNode_Call
GetNode is a helper method to define mock.On call
- ctx context.Context
- nodename string
func (*Store_Expecter) ListRunningWorkloadIDs ¶ added in v0.1.1
func (_e *Store_Expecter) ListRunningWorkloadIDs(ctx any) *Store_ListRunningWorkloadIDs_Call
ListRunningWorkloadIDs is a helper method to define mock.On call
- ctx context.Context
func (*Store_Expecter) SetNodeStatus ¶
func (_e *Store_Expecter) SetNodeStatus(ctx any, ttl any) *Store_SetNodeStatus_Call
SetNodeStatus is a helper method to define mock.On call
- ctx context.Context
- ttl int64
func (*Store_Expecter) SetWorkloadStatus ¶
func (_e *Store_Expecter) SetWorkloadStatus(ctx any, status any) *Store_SetWorkloadStatus_Call
SetWorkloadStatus is a helper method to define mock.On call
- ctx context.Context
- status *types.WorkloadStatus
type Store_GetIdentifier_Call ¶
Store_GetIdentifier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIdentifier'
func (*Store_GetIdentifier_Call) Return ¶
func (_c *Store_GetIdentifier_Call) Return(s string) *Store_GetIdentifier_Call
func (*Store_GetIdentifier_Call) Run ¶
func (_c *Store_GetIdentifier_Call) Run(run func(ctx context.Context)) *Store_GetIdentifier_Call
func (*Store_GetIdentifier_Call) RunAndReturn ¶
func (_c *Store_GetIdentifier_Call) RunAndReturn(run func(ctx context.Context) string) *Store_GetIdentifier_Call
type Store_GetNode_Call ¶
Store_GetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNode'
func (*Store_GetNode_Call) Return ¶
func (_c *Store_GetNode_Call) Return(node *types.Node, err error) *Store_GetNode_Call
func (*Store_GetNode_Call) Run ¶
func (_c *Store_GetNode_Call) Run(run func(ctx context.Context, nodename string)) *Store_GetNode_Call
func (*Store_GetNode_Call) RunAndReturn ¶
func (_c *Store_GetNode_Call) RunAndReturn(run func(ctx context.Context, nodename string) (*types.Node, error)) *Store_GetNode_Call
type Store_ListRunningWorkloadIDs_Call ¶ added in v0.1.1
Store_ListRunningWorkloadIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunningWorkloadIDs'
func (*Store_ListRunningWorkloadIDs_Call) Return ¶ added in v0.1.1
func (_c *Store_ListRunningWorkloadIDs_Call) Return(strings []string, err error) *Store_ListRunningWorkloadIDs_Call
func (*Store_ListRunningWorkloadIDs_Call) Run ¶ added in v0.1.1
func (_c *Store_ListRunningWorkloadIDs_Call) Run(run func(ctx context.Context)) *Store_ListRunningWorkloadIDs_Call
func (*Store_ListRunningWorkloadIDs_Call) RunAndReturn ¶ added in v0.1.1
func (_c *Store_ListRunningWorkloadIDs_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *Store_ListRunningWorkloadIDs_Call
type Store_SetNodeStatus_Call ¶
Store_SetNodeStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNodeStatus'
func (*Store_SetNodeStatus_Call) Return ¶
func (_c *Store_SetNodeStatus_Call) Return(err error) *Store_SetNodeStatus_Call
func (*Store_SetNodeStatus_Call) Run ¶
func (_c *Store_SetNodeStatus_Call) Run(run func(ctx context.Context, ttl int64)) *Store_SetNodeStatus_Call
func (*Store_SetNodeStatus_Call) RunAndReturn ¶
func (_c *Store_SetNodeStatus_Call) RunAndReturn(run func(ctx context.Context, ttl int64) error) *Store_SetNodeStatus_Call
type Store_SetWorkloadStatus_Call ¶
Store_SetWorkloadStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWorkloadStatus'
func (*Store_SetWorkloadStatus_Call) Return ¶
func (_c *Store_SetWorkloadStatus_Call) Return(err error) *Store_SetWorkloadStatus_Call
func (*Store_SetWorkloadStatus_Call) Run ¶
func (_c *Store_SetWorkloadStatus_Call) Run(run func(ctx context.Context, status *types.WorkloadStatus)) *Store_SetWorkloadStatus_Call
func (*Store_SetWorkloadStatus_Call) RunAndReturn ¶
func (_c *Store_SetWorkloadStatus_Call) RunAndReturn(run func(ctx context.Context, status *types.WorkloadStatus) error) *Store_SetWorkloadStatus_Call