mocks

package
v0.0.0-...-b022d11 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeStore

func NewFakeStore() store.Store

NewFakeStore returns a mock store instance created from mock

Types

type MockStore

type MockStore struct {
	Store
	sync.Mutex
	// contains filtered or unexported fields
}

MockStore .

func (*MockStore) GetMockWorkloadStatus

func (m *MockStore) GetMockWorkloadStatus(ID string) *types.WorkloadStatus

GetMockWorkloadStatus returns the mock workload status by ID

func (*MockStore) StartNodeStatusStream

func (m *MockStore) StartNodeStatusStream()

StartNodeStatusStream "faker" up, "fake" down.

func (*MockStore) StopNodeStatusStream

func (m *MockStore) StopNodeStatusStream()

StopNodeStatusStream send an err to errChan.

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t mockConstructorTestingTNewStore) *Store

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.

func (*Store) GetIdentifier

func (_m *Store) GetIdentifier(ctx context.Context) string

GetIdentifier provides a mock function with given fields: ctx

func (*Store) GetNode

func (_m *Store) GetNode(ctx context.Context, nodename string) (*types.Node, error)

GetNode provides a mock function with given fields: ctx, nodename

func (*Store) GetNodeStatus

func (_m *Store) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)

GetNodeStatus provides a mock function with given fields: ctx, nodename

func (*Store) ListPodNodes

func (_m *Store) ListPodNodes(ctx context.Context, all bool, podname string, labels map[string]string) ([]*types.Node, error)

ListPodNodes provides a mock function with given fields: ctx, all, podname, labels

func (*Store) NodeStatusStream

func (_m *Store) NodeStatusStream(ctx context.Context) (<-chan *types.NodeStatus, <-chan error)

NodeStatusStream provides a mock function with given fields: ctx

func (*Store) SetNodeStatus

func (_m *Store) SetNodeStatus(ctx context.Context, ttl int64) error

SetNodeStatus provides a mock function with given fields: ctx, ttl

func (*Store) SetWorkloadStatus

func (_m *Store) SetWorkloadStatus(ctx context.Context, status *types.WorkloadStatus, ttl int64) error

SetWorkloadStatus provides a mock function with given fields: ctx, status, ttl

Jump to

Keyboard shortcuts

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