policycache

package
v1.5.1-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPolicyCache

type MockPolicyCache struct {
	// contains filtered or unexported fields
}

MockPolicyCache is mock for PolicyCache that only provides fake implementation of LookupPod().

func NewMockPolicyCache

func NewMockPolicyCache() *MockPolicyCache

NewMockPolicyCache is a constructor for MockPolicyCache.

func (*MockPolicyCache) AddPodConfig

func (mpc *MockPolicyCache) AddPodConfig(id podmodel.ID, ipAddr string, labels ...*podmodel.Pod_Label)

AddPodConfig allows to fill the cache with fake pod data.

func (*MockPolicyCache) ListAllNamespaces

func (mpc *MockPolicyCache) ListAllNamespaces() (namespaces []nsmodel.ID)

ListAllNamespaces is not implemented by the mock.

func (*MockPolicyCache) ListAllPods

func (mpc *MockPolicyCache) ListAllPods() (pods []podmodel.ID)

ListAllPods is not implemented by the mock.

func (*MockPolicyCache) ListAllPolicies

func (mpc *MockPolicyCache) ListAllPolicies() (policies []policymodel.ID)

ListAllPolicies is not implemented by the mock.

func (*MockPolicyCache) LookupNamespace

func (mpc *MockPolicyCache) LookupNamespace(namespace nsmodel.ID) (found bool, data *nsmodel.Namespace)

LookupNamespace is not implemented by the mock.

func (*MockPolicyCache) LookupPod

func (mpc *MockPolicyCache) LookupPod(pod podmodel.ID) (found bool, data *podmodel.Pod)

LookupPod return pod config previously added using AddPodConfig.

func (*MockPolicyCache) LookupPodsByLabelSelectorInsideNs

func (mpc *MockPolicyCache) LookupPodsByLabelSelectorInsideNs(namespace string, podLabelSelector *policymodel.Policy_LabelSelector) (pods []podmodel.ID)

LookupPodsByLabelSelectorInsideNs is not implemented by the mock.

func (*MockPolicyCache) LookupPodsByNamespace

func (mpc *MockPolicyCache) LookupPodsByNamespace(policyNamespace string) (pods []podmodel.ID)

LookupPodsByNamespace is not implemented by the mock.

func (*MockPolicyCache) LookupPodsByNsLabelSelector

func (mpc *MockPolicyCache) LookupPodsByNsLabelSelector(podLabelSelector *policymodel.Policy_LabelSelector) (pods []podmodel.ID)

LookupPodsByNsLabelSelector is not implemented by the mock.

func (*MockPolicyCache) LookupPoliciesByPod

func (mpc *MockPolicyCache) LookupPoliciesByPod(pod podmodel.ID) (policies []policymodel.ID)

LookupPoliciesByPod is not implemented by the mock.

func (*MockPolicyCache) LookupPolicy

func (mpc *MockPolicyCache) LookupPolicy(policy policymodel.ID) (found bool, data *policymodel.Policy)

LookupPolicy is not implemented by the mock.

func (*MockPolicyCache) Resync

func (mpc *MockPolicyCache) Resync(resyncEv datasync.ResyncEvent) error

Resync is not implemented by the mock.

func (*MockPolicyCache) Update

func (mpc *MockPolicyCache) Update(dataChngEv datasync.ChangeEvent) error

Update is not implemented by the mock.

func (*MockPolicyCache) Watch

func (mpc *MockPolicyCache) Watch(watcher cache.PolicyCacheWatcher) error

Watch is not implemented by the mock.

Jump to

Keyboard shortcuts

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