labelidentity

package
v1.11.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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)
	// GetLabelIdentityIDs retrieves the label identity IDs selected by the provided selectorItem keys.
	GetLabelIdentityIDs(selectorKey string) []uint32
	// SetPolicySelectors registers a policy's selectors with the index.
	SetPolicySelectors(selectors []*types.GroupSelector, policyKey string) []uint32
	// 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) GetLabelIdentityIDs

func (i *LabelIdentityIndex) GetLabelIdentityIDs(selectorKey string) []uint32

func (*LabelIdentityIndex) HasSynced

func (i *LabelIdentityIndex) HasSynced() bool

func (*LabelIdentityIndex) Run

func (i *LabelIdentityIndex) Run(stopCh <-chan struct{})

func (*LabelIdentityIndex) SetPolicySelectors

func (i *LabelIdentityIndex) SetPolicySelectors(selectors []*types.GroupSelector, policyKey string) []uint32

SetPolicySelectors registers ClusterSet-scope policy selectors with the labelIdentityIndex, and then retrieves all the LabelIdentity IDs that currently match these selectors.

Jump to

Keyboard shortcuts

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