feat(scheduler): move node info snapshot out of internal package

This commit is contained in:
draveness
2019-08-23 22:32:16 +08:00
parent 518ff2a405
commit ffef11f768
13 changed files with 55 additions and 35 deletions

View File

@@ -101,7 +101,7 @@ type Cache interface {
// UpdateNodeInfoSnapshot updates the passed infoSnapshot to the current contents of Cache.
// The node info contains aggregated information of pods scheduled (including assumed to be)
// on this node.
UpdateNodeInfoSnapshot(nodeSnapshot *NodeInfoSnapshot) error
UpdateNodeInfoSnapshot(nodeSnapshot *schedulernodeinfo.Snapshot) error
// AddCSINode adds overall CSI-related information about node.
AddCSINode(csiNode *storagev1beta1.CSINode) error
@@ -130,11 +130,3 @@ type Snapshot struct {
AssumedPods map[string]bool
Nodes map[string]*schedulernodeinfo.NodeInfo
}
// NodeInfoSnapshot is a snapshot of cache NodeInfo. The scheduler takes a
// snapshot at the beginning of each scheduling cycle and uses it for its
// operations in that cycle.
type NodeInfoSnapshot struct {
NodeInfoMap map[string]*schedulernodeinfo.NodeInfo
Generation int64
}