Documentation
¶
Index ¶
- type Controller
- type Interface
- type LabelIdentityIndex
- func (i *LabelIdentityIndex) AddEventHandler(handler eventHandler)
- func (i *LabelIdentityIndex) AddLabelIdentity(labelKey string, id uint32)
- func (i *LabelIdentityIndex) AddSelector(selector *types.GroupSelector, policyKey string) []uint32
- func (i *LabelIdentityIndex) DeleteLabelIdentity(labelKey string)
- func (i *LabelIdentityIndex) DeletePolicySelectors(policyKey string)
- func (i *LabelIdentityIndex) DeleteSelector(selectorKey string, policyKey string)
- func (i *LabelIdentityIndex) HasSynced() bool
- func (i *LabelIdentityIndex) RemoveStalePolicySelectors(selectorKeys sets.Set[string], policyKey string)
- func (i *LabelIdentityIndex) Run(stopCh <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewLabelIdentityController ¶
func NewLabelIdentityController(index *LabelIdentityIndex, labelInformer mcinformers.LabelIdentityInformer) *Controller
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{})
type Interface ¶
type Interface interface {
// AddSelector adds or updates a selectorItem when a new selector is added to a policy.
AddSelector(selector *types.GroupSelector, policyKey string) []uint32
// DeleteSelector deletes or updates a selectorItem when a selector is deleted from a policy.
DeleteSelector(selectorKey string, policyKey string)
// RemoveStalePolicySelectors cleans up any outdated selector <-> policy mapping based on the policy's latest selectors.
RemoveStalePolicySelectors(selectorKeys sets.Set[string], policyKey string)
// DeletePolicySelectors removes any selectors from referring to the policy being deleted.
DeletePolicySelectors(policyKey string)
// AddLabelIdentity adds LabelIdentity-ID mapping to the index.
AddLabelIdentity(labelKey string, id uint32)
// DeleteLabelIdentity deletes a LabelIdentity from the index.
DeleteLabelIdentity(labelKey string)
// AddEventHandler registers an eventHandler with the index.
AddEventHandler(handler eventHandler)
// Run starts the index.
Run(stopCh <-chan struct{})
// HasSynced returns true if the interface has been initialized with the full lists of LabelIdentities.
HasSynced() bool
}
type LabelIdentityIndex ¶
type LabelIdentityIndex struct {
// contains filtered or unexported fields
}
LabelIdentityIndex implements Interface.
func NewLabelIdentityIndex ¶
func NewLabelIdentityIndex() *LabelIdentityIndex
func (*LabelIdentityIndex) AddEventHandler ¶
func (i *LabelIdentityIndex) AddEventHandler(handler eventHandler)
func (*LabelIdentityIndex) AddLabelIdentity ¶
func (i *LabelIdentityIndex) AddLabelIdentity(labelKey string, id uint32)
func (*LabelIdentityIndex) AddSelector ¶
func (i *LabelIdentityIndex) AddSelector(selector *types.GroupSelector, policyKey string) []uint32
AddSelector registers a selectorItem to policy mapping with the LabelIdentityIndex, and returns the list of LabelIdentity IDs that the selector selects.
func (*LabelIdentityIndex) DeleteLabelIdentity ¶
func (i *LabelIdentityIndex) DeleteLabelIdentity(labelKey string)
func (*LabelIdentityIndex) DeletePolicySelectors ¶
func (i *LabelIdentityIndex) DeletePolicySelectors(policyKey string)
func (*LabelIdentityIndex) DeleteSelector ¶
func (i *LabelIdentityIndex) DeleteSelector(selectorKey string, policyKey string)
DeleteSelector removes a selectorItem from referring to the policy being deleted.
func (*LabelIdentityIndex) HasSynced ¶
func (i *LabelIdentityIndex) HasSynced() bool
func (*LabelIdentityIndex) RemoveStalePolicySelectors ¶ added in v1.11.0
func (i *LabelIdentityIndex) RemoveStalePolicySelectors(selectorKeys sets.Set[string], policyKey string)
RemoveStalePolicySelectors cleans up any outdated selector <-> policy mapping based on the policy's latest selectors.
func (*LabelIdentityIndex) Run ¶
func (i *LabelIdentityIndex) Run(stopCh <-chan struct{})
Click to show internal directories.
Click to hide internal directories.