Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepCopy ¶
func DeepCopy(pairs map[types.UID]*PodNodePair) map[types.UID]*PodNodePair
DeepCopy copies the pod node pair
Types ¶
type PGStatusCache ¶
type PGStatusCache struct { sync.RWMutex // NodeDiskStatus maps podGroupName to its DiskStatus PGStatusMap map[string]*PodGroupMatchStatus }
PGStatusCache provide safe function Get, Set, Delete.
func NewPGStatusCache ¶
func NewPGStatusCache() *PGStatusCache
NewPGStatusCache initializers pod status cache
func (*PGStatusCache) Delete ¶
func (psc *PGStatusCache) Delete(podGroupName string)
Delete Node status from cache
func (*PGStatusCache) Get ¶
func (psc *PGStatusCache) Get(podGroupName string) Object
Get cache according to podGroupName
func (*PGStatusCache) Set ¶
func (psc *PGStatusCache) Set(podGroupName string, pg Object)
Set node status to the cache
type PodGroupMatchStatus ¶
type PodGroupMatchStatus struct { // used to lock map CountLock sync.RWMutex PodGroup *v1.PodGroup // store permitted pod node map with ttl MatchedPodNodes *gochache.Cache // store permitted pod name and uuid map with ttl PodNameUIDs *gochache.Cache // failed pods Failed map[string]string // succeed pods Succeed map[string]string Pod *v12.Pod // Scheduled marks if has scheduled Scheduled bool }
PodGroupMatchStatus helps record pod group status
type PodNodePair ¶
PodNodePair is a pair contains pod name and node
Click to show internal directories.
Click to hide internal directories.