sdhedulerCache

package
v0.0.0-...-f822177 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_LEVEL_DEBUG = 100
	//PodGroupVersionV1Alpha1 represents PodGroupVersion of V1Alpha1
	NodeCacheGroup     string = "inspur.com"
	NodeCacheVersionV1 string = "v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NcItem

type NcItem struct {
	Name     string
	Datasets string `json:"datasets,omitempty" protobuf:"bytes,1,opt,name=datasets"`
	// Disk size unit :GB
	FreeSize int64 `json:"freesize,omitempty" protobuf:"bytes,2,opt,name=freesize"`
	// Disk size unit :GB
	AllocatableSize int64 `json:"allocatablesize,omitempty" protobuf:"bytes,2,opt,name=allocatablesize"`
}

type NodeCache

type NodeCache struct {
	// nodename -> nodecache
	NCMap map[string]*NcItem
}

type SchedulerCache

type SchedulerCache struct {
	sync.Mutex
	NCInformerv1 ncinfov1.NodeCacheInformer
	NC           NodeCache
	MC           *mem.Cache
	Version      string
}
var GSchedulerCache *SchedulerCache

func (*SchedulerCache) AddNodeCacheV1

func (sc *SchedulerCache) AddNodeCacheV1(obj interface{})

AddNodeCacheV1 add NodeCache to scheduler cache

func (*SchedulerCache) DeleteNodeCacheV1

func (sc *SchedulerCache) DeleteNodeCacheV1(obj interface{})

DeleteNodeCacheV1 delete podgroup from scheduler cache

func (*SchedulerCache) Run

func (sc *SchedulerCache) Run(stopCh <-chan struct{})

func (*SchedulerCache) UpdateNodeCacheV1

func (sc *SchedulerCache) UpdateNodeCacheV1(oldObj, newObj interface{})

UpdateNodeCacheV1 add NodeCache to scheduler cache

func (*SchedulerCache) WaitForCacheSync

func (sc *SchedulerCache) WaitForCacheSync(stopCh <-chan struct{}) bool

Jump to

Keyboard shortcuts

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