mockstore

package
v0.0.0-...-1a62c48 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLock

type MockLock struct {
	mock.Mock
}

MockLock for mock lock

func (*MockLock) Lock

func (m *MockLock) Lock(ctx context.Context) error

Lock mock lock

func (*MockLock) Unlock

func (m *MockLock) Unlock(ctx context.Context) error

Unlock mock unlock

type MockStore

type MockStore struct {
	mock.Mock
}

MockStore mock store

func (*MockStore) AddContainer

func (m *MockStore) AddContainer(ctx context.Context, container *types.Container) error

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) AddPod

func (m *MockStore) AddPod(ctx context.Context, name, favor, desc string) (*types.Pod, error)

AddPod fake add pod

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

func (m *MockStore) CreateLock(key string, ttl int) (lock.DistributedLock, error)

CreateLock fake create lock

func (*MockStore) DeleteNode

func (m *MockStore) DeleteNode(ctx context.Context, node *types.Node)

DeleteNode fake delete node

func (*MockStore) GetAllNodes

func (m *MockStore) GetAllNodes(ctx context.Context) ([]*types.Node, error)

GetAllNodes fake get all nodes

func (*MockStore) GetAllPods

func (m *MockStore) GetAllPods(ctx context.Context) ([]*types.Pod, error)

GetAllPods fake get all pods

func (*MockStore) GetContainer

func (m *MockStore) GetContainer(ctx context.Context, ID string) (*types.Container, error)

GetContainer fake get container

func (*MockStore) GetContainers

func (m *MockStore) GetContainers(ctx context.Context, IDs []string) ([]*types.Container, error)

GetContainers fake get containers

func (*MockStore) GetNode

func (m *MockStore) GetNode(ctx context.Context, pod, node string) (*types.Node, error)

GetNode fake get node

func (*MockStore) GetNodeByName

func (m *MockStore) GetNodeByName(ctx context.Context, node string) (*types.Node, error)

GetNodeByName fake get node by name

func (*MockStore) GetNodesByPod

func (m *MockStore) GetNodesByPod(ctx context.Context, name string) ([]*types.Node, error)

GetNodesByPod fake get nodes by pod

func (*MockStore) GetPod

func (m *MockStore) GetPod(ctx context.Context, name string) (*types.Pod, error)

GetPod fake get 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

func (m *MockStore) RemoveContainer(ctx context.Context, container *types.Container) error

RemoveContainer fake remove container

func (*MockStore) RemovePod

func (m *MockStore) RemovePod(ctx context.Context, podname string) error

RemovePod fake remove pod

func (*MockStore) UpdateNode

func (m *MockStore) UpdateNode(ctx context.Context, node *types.Node) error

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

Jump to

Keyboard shortcuts

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