Documentation
¶
Index ¶
- type MockLock
- type MockStore
- func (m *MockStore) AddContainer(ctx context.Context, container *types.Container) error
- func (m *MockStore) AddNode(ctx context.Context, name, endpoint, podname, ca, cert, key string, ...) (*types.Node, error)
- func (m *MockStore) AddPod(ctx context.Context, name, favor, desc string) (*types.Pod, error)
- func (m *MockStore) CleanContainerData(ctx context.Context, ID, appname, entrypoint, nodename string) error
- func (m *MockStore) ContainerDeployed(ctx context.Context, ID, appname, entrypoint, nodename, data string) error
- func (m *MockStore) CreateLock(key string, ttl int) (lock.DistributedLock, error)
- func (m *MockStore) DeleteNode(ctx context.Context, node *types.Node)
- func (m *MockStore) GetAllNodes(ctx context.Context) ([]*types.Node, error)
- func (m *MockStore) GetAllPods(ctx context.Context) ([]*types.Pod, error)
- func (m *MockStore) GetContainer(ctx context.Context, ID string) (*types.Container, error)
- func (m *MockStore) GetContainers(ctx context.Context, IDs []string) ([]*types.Container, error)
- func (m *MockStore) GetNode(ctx context.Context, pod, node string) (*types.Node, error)
- func (m *MockStore) GetNodeByName(ctx context.Context, node string) (*types.Node, error)
- func (m *MockStore) GetNodesByPod(ctx context.Context, name string) ([]*types.Node, error)
- func (m *MockStore) GetPod(ctx context.Context, name string) (*types.Pod, error)
- func (m *MockStore) ListContainers(ctx context.Context, appname, entrypoint, nodename string) ([]*types.Container, error)
- func (m *MockStore) ListNodeContainers(ctx context.Context, nodename string) ([]*types.Container, error)
- func (m *MockStore) MakeDeployStatus(ctx context.Context, opts *types.DeployOptions, nodesInfo []types.NodeInfo) ([]types.NodeInfo, error)
- func (m *MockStore) RemoveContainer(ctx context.Context, container *types.Container) error
- func (m *MockStore) RemovePod(ctx context.Context, podname string) error
- func (m *MockStore) UpdateNode(ctx context.Context, node *types.Node) error
- func (m *MockStore) UpdateNodeResource(ctx context.Context, podname, nodename string, cpu types.CPUMap, mem int64, ...) error
- func (m *MockStore) WatchDeployStatus(appname, entrypoint, nodename string) etcdclient.Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStore ¶
MockStore mock store
func (*MockStore) AddContainer ¶
AddContainer fake add container
func (*MockStore) AddNode ¶
func (m *MockStore) AddNode(ctx context.Context, name, endpoint, podname, ca, cert, key string, cpu, share int, memory int64, labels map[string]string) (*types.Node, error)
AddNode fake add node
func (*MockStore) CleanContainerData ¶
func (m *MockStore) CleanContainerData(ctx context.Context, ID, appname, entrypoint, nodename string) error
CleanContainerData fake clean container data
func (*MockStore) ContainerDeployed ¶
func (m *MockStore) ContainerDeployed(ctx context.Context, ID, appname, entrypoint, nodename, data string) error
ContainerDeployed fake container deployed
func (*MockStore) CreateLock ¶
CreateLock fake create lock
func (*MockStore) DeleteNode ¶
DeleteNode fake delete node
func (*MockStore) GetAllNodes ¶
GetAllNodes fake get all nodes
func (*MockStore) GetAllPods ¶
GetAllPods fake get all pods
func (*MockStore) GetContainer ¶
GetContainer fake get container
func (*MockStore) GetContainers ¶
GetContainers fake get containers
func (*MockStore) GetNodeByName ¶
GetNodeByName fake get node by name
func (*MockStore) GetNodesByPod ¶
GetNodesByPod fake get nodes by pod
func (*MockStore) ListContainers ¶
func (m *MockStore) ListContainers(ctx context.Context, appname, entrypoint, nodename string) ([]*types.Container, error)
ListContainers fake list containers
func (*MockStore) ListNodeContainers ¶
func (m *MockStore) ListNodeContainers(ctx context.Context, nodename string) ([]*types.Container, error)
ListNodeContainers fake list node containers
func (*MockStore) MakeDeployStatus ¶
func (m *MockStore) MakeDeployStatus(ctx context.Context, opts *types.DeployOptions, nodesInfo []types.NodeInfo) ([]types.NodeInfo, error)
MakeDeployStatus fake make deploy status
func (*MockStore) RemoveContainer ¶
RemoveContainer fake remove container
func (*MockStore) UpdateNode ¶
UpdateNode fake update node
func (*MockStore) UpdateNodeResource ¶
func (m *MockStore) UpdateNodeResource(ctx context.Context, podname, nodename string, cpu types.CPUMap, mem int64, action string) error
UpdateNodeResource fake update node resource
func (*MockStore) WatchDeployStatus ¶
func (m *MockStore) WatchDeployStatus(appname, entrypoint, nodename string) etcdclient.Watcher
WatchDeployStatus fake watch deploy status