Documentation ¶
Index ¶
- func IndexFunction(data interface{}) map[string][]string
- type ConfigIndex
- func (ci *ConfigIndex) ListAll() (podIDs []string)
- func (ci *ConfigIndex) LookupPod(podID string) (found bool, data *podmodel.Pod)
- func (ci *ConfigIndex) LookupPodsByLabelKey(podKeySelector string) (podIDs []string)
- func (ci *ConfigIndex) LookupPodsByLabelSelector(podLabelSelector string) (podIDs []string)
- func (ci *ConfigIndex) LookupPodsByNSKey(podNSKeySelector string) (podIDs []string)
- func (ci *ConfigIndex) LookupPodsByNSLabelSelector(podNSLabelSelector string) (podIDs []string)
- func (ci *ConfigIndex) LookupPodsByNamespace(podNamespace string) (podIDs []string)
- func (ci *ConfigIndex) RegisterPod(podID string, data *podmodel.Pod)
- func (ci *ConfigIndex) UnregisterPod(podID string) (found bool, data *podmodel.Pod)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexFunction ¶
IndexFunction creates secondary indexes. Currently podName and podNamespace fields are indexed.
Types ¶
type ConfigIndex ¶
type ConfigIndex struct {
// contains filtered or unexported fields
}
ConfigIndex implements a cache for configured policies. Primary index is PolicyName.
func NewConfigIndex ¶
func NewConfigIndex(logger logging.Logger, title string) *ConfigIndex
NewConfigIndex creates new instance of ConfigIndex
func (*ConfigIndex) ListAll ¶
func (ci *ConfigIndex) ListAll() (podIDs []string)
ListAll returns all registered Pods in the mapping.
func (*ConfigIndex) LookupPod ¶
func (ci *ConfigIndex) LookupPod(podID string) (found bool, data *podmodel.Pod)
LookupPod looks up an entry in the Pod map given a PodID
func (*ConfigIndex) LookupPodsByLabelKey ¶
func (ci *ConfigIndex) LookupPodsByLabelKey(podKeySelector string) (podIDs []string)
LookupPodsByLabelKey performs lookup based on secondary index podKeySelector.
func (*ConfigIndex) LookupPodsByLabelSelector ¶
func (ci *ConfigIndex) LookupPodsByLabelSelector(podLabelSelector string) (podIDs []string)
LookupPodsByLabelSelector performs lookup based on secondary index podLabelSelector.
func (*ConfigIndex) LookupPodsByNSKey ¶
func (ci *ConfigIndex) LookupPodsByNSKey(podNSKeySelector string) (podIDs []string)
LookupPodsByNSKey performs lookup based on secondary index podNamespace/podLabelKey.
func (*ConfigIndex) LookupPodsByNSLabelSelector ¶
func (ci *ConfigIndex) LookupPodsByNSLabelSelector(podNSLabelSelector string) (podIDs []string)
LookupPodsByNSLabelSelector performs lookup based on secondary index podNamespace/podLabelSelector.
func (*ConfigIndex) LookupPodsByNamespace ¶
func (ci *ConfigIndex) LookupPodsByNamespace(podNamespace string) (podIDs []string)
LookupPodsByNamespace performs lookup based on secondary index podNamespace.
func (*ConfigIndex) RegisterPod ¶
func (ci *ConfigIndex) RegisterPod(podID string, data *podmodel.Pod)
RegisterPod adds new pod entry into the mapping
func (*ConfigIndex) UnregisterPod ¶
func (ci *ConfigIndex) UnregisterPod(podID string) (found bool, data *podmodel.Pod)
UnregisterPod removes a pod entry from the mapping