pdbstore

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstores.StoreName = "PdbStore"

Variables

This section is empty.

Functions

func NewCache

func NewCache(handler handler.CacheHandler) commonstores.CommonStore

func NewPDBItemImpl

func NewPDBItemImpl(pdb *policy.PodDisruptionBudget) *pdbItemImpl

func NewSnapshot

func NewSnapshot(handler handler.CacheHandler) commonstores.CommonStore

Types

type OwnerItemImpl

type OwnerItemImpl struct {
	Pdbs framework.GenerationStringSet
	// contains filtered or unexported fields
}

func (*OwnerItemImpl) AddPDB

func (o *OwnerItemImpl) AddPDB(key string)

func (*OwnerItemImpl) Clone

func (o *OwnerItemImpl) Clone() framework.OwnerItem

func (*OwnerItemImpl) GetGeneration

func (o *OwnerItemImpl) GetGeneration() int64

func (*OwnerItemImpl) GetOwnerLabels

func (o *OwnerItemImpl) GetOwnerLabels() map[string]string

func (*OwnerItemImpl) GetPDBUpdated

func (o *OwnerItemImpl) GetPDBUpdated() bool

func (*OwnerItemImpl) GetRelatedPDBs

func (o *OwnerItemImpl) GetRelatedPDBs() []string

func (*OwnerItemImpl) RemovePDB

func (o *OwnerItemImpl) RemovePDB(key string)

func (*OwnerItemImpl) Replace

func (o *OwnerItemImpl) Replace(item framework.OwnerItem)

func (*OwnerItemImpl) SetGeneration

func (o *OwnerItemImpl) SetGeneration(generation int64)

func (*OwnerItemImpl) SetPDBUpdated

func (o *OwnerItemImpl) SetPDBUpdated()

type PdbStore

type PdbStore struct {
	commonstores.BaseStore

	// key is replicaset namespace/name
	ReplicaSets generationstore.Store
	// key is daemonset namespace/name
	DaemonSets generationstore.Store
	// key is pdb namespace/name
	Pdbs generationstore.Store
	// contains filtered or unexported fields
}

PdbStore is used to cache pdb and pdb selectors Operation of this struct is not thread-safe, should ensure thread-safe by callers.

func (*PdbStore) AddOwner

func (s *PdbStore) AddOwner(ownerType, ownerKey string, ownerLabels map[string]string) error

func (*PdbStore) AddPDB

func (s *PdbStore) AddPDB(pdb *policy.PodDisruptionBudget) error

func (*PdbStore) DeleteOwner

func (s *PdbStore) DeleteOwner(ownerType, ownerKey string) error

func (*PdbStore) DeletePDB

func (s *PdbStore) DeletePDB(pdb *policy.PodDisruptionBudget) error

func (*PdbStore) GetOwnerLabels

func (s *PdbStore) GetOwnerLabels(ownerType, ownerKey string) map[string]string

func (*PdbStore) GetOwnersForPDB

func (s *PdbStore) GetOwnersForPDB(key, ownerType string) []string

func (*PdbStore) GetPDBItemList

func (s *PdbStore) GetPDBItemList() []framework.PDBItem

func (*PdbStore) GetPDBsForOwner

func (s *PdbStore) GetPDBsForOwner(ownerType, ownerKey string) (bool, bool, []string)

func (*PdbStore) Name

func (c *PdbStore) Name() commonstores.StoreName

func (*PdbStore) SetPDBUpdated

func (s *PdbStore) SetPDBUpdated(ownerType, ownerKey string)

func (*PdbStore) UpdateOwner

func (c *PdbStore) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error

func (*PdbStore) UpdatePDB

func (s *PdbStore) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error

func (*PdbStore) UpdateSnapshot

func (s *PdbStore) UpdateSnapshot(store commonstores.CommonStore) error

Jump to

Keyboard shortcuts

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