Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIDState ¶
type CIDState struct {
// contains filtered or unexported fields
}
func NewCIDState ¶
func NewCIDState() *CIDState
func (*CIDState) LookupByID ¶
func (c *CIDState) LookupByID(id string) (*key.GlobalIdentity, bool)
func (*CIDState) LookupByKey ¶
func (c *CIDState) LookupByKey(k *key.GlobalIdentity) (string, bool)
type CIDUsageInCES ¶
type CIDUsageInCES struct {
// contains filtered or unexported fields
}
func NewCIDUsageInCES ¶
func NewCIDUsageInCES() *CIDUsageInCES
func (*CIDUsageInCES) CIDUsageCount ¶
func (c *CIDUsageInCES) CIDUsageCount(cidName string) int
func (*CIDUsageInCES) ProcessCESDelete ¶
func (c *CIDUsageInCES) ProcessCESDelete(cesName string, endpoints []v2alpha1.CoreCiliumEndpoint) []int64
ProcessCESDelete reduces the CID usage in CES, based on the provided CES.
func (*CIDUsageInCES) ProcessCESUpsert ¶
func (c *CIDUsageInCES) ProcessCESUpsert(cesName string, endpoints []v2alpha1.CoreCiliumEndpoint) []int64
ProcessCESUpsert updates the CID usage in CES based on the provided CES. When the CES is new, it will just add all used CIDs. When CES is updated, it uses previous CID usage for the same CES, that it tracks, to accordingly reduce CID usage in CES.
type CIDUsageInPods ¶
type CIDUsageInPods struct {
// contains filtered or unexported fields
}
func NewCIDUsageInPods ¶
func NewCIDUsageInPods() *CIDUsageInPods
func (*CIDUsageInPods) AssignCIDToPod ¶
func (c *CIDUsageInPods) AssignCIDToPod(podName, cidName string) (string, int)
AssignCIDToPod updates the pod to CID map and increments the CID usage. It also decrements the previous CID usage and returns the CID name of previously set CID and its usage count after decrementing the CID usage. The return values are used to track when old CIDs are no longer used.
func (*CIDUsageInPods) CIDUsageCount ¶
func (c *CIDUsageInPods) CIDUsageCount(cidName string) int
func (*CIDUsageInPods) CIDUsedByPod ¶
func (c *CIDUsageInPods) CIDUsedByPod(podName string) (string, bool)
func (*CIDUsageInPods) RemovePod ¶
func (c *CIDUsageInPods) RemovePod(podName string) (string, int, error)
RemovePod removes the pod from the pod to CID map, decrements the CID usage and returns the CID name and its usage count after decrementing the usage. The return values are used to track when old CIDs are no longer used.