Documentation ¶
Index ¶
- func DecodeKey(key string) string
- func EncodeKey(key string) string
- func GetCPUQuantity(resList core.ResourceList) int64
- func GetFrameworkAnnotation(f *ci.Framework, key string, defaultVal string) string
- func GetFrameworkKey(obj interface{}) string
- func GetFrameworkLabel(f *ci.Framework, key string) string
- func GetFrameworkQueuingTimestamp(f *ci.Framework) time.Time
- func GetFrameworkScheduleCategory(f *ci.Framework) string
- func GetFrameworkSchedulePreemption(f *ci.Framework) int64
- func GetFrameworkScheduleZone(f *ci.Framework) string
- func GetGPUQuantity(resList core.ResourceList) int64
- func GetMemoryQuantity(resList core.ResourceList) int64
- func GetNodeHostIP(node *core.Node) string
- func GetNodeKey(key interface{}) string
- func GetNodeLabelValue(node *core.Node, label string, defaultValue string) string
- func GetPodFrameworkKey(kPod *core.Pod) string
- func GetPodFrameworkName(kPod *core.Pod) string
- func GetPodKey(key interface{}) string
- func GetZoneKey(key interface{}) string
- func HasPrefixNode(key interface{}) bool
- func HasPrefixPod(key interface{}) bool
- func HasPrefixZone(key interface{}) bool
- func LogFrameworks(prefix string, fm map[string]*SkdFramework, lock *sync.RWMutex)
- func MaxInt64(a, b int64) int64
- func ReadLock(lock *sync.RWMutex)
- func ReadUnlock(lock *sync.RWMutex)
- func SetFrameworkLabel(f *ci.Framework, key string, value string)
- func TestScheduleCategory(fwkCategory, category string) bool
- func ToZoneKey(category string, zone string) string
- func WriteLock(lock *sync.RWMutex)
- func WriteUnlock(lock *sync.RWMutex)
- type ExpectedFrameworkStatusInfo
- type FrameworkController
- type FrameworkScheduler
- type InterdomScheduler
- type SkdFramework
- type SkdNode
- type SkdPod
- type SkdResourceRequirements
- type SkdResources
- type SkdZone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCPUQuantity ¶
func GetCPUQuantity(resList core.ResourceList) int64
func GetFrameworkAnnotation ¶
func GetFrameworkKey ¶
func GetFrameworkKey(obj interface{}) string
func GetGPUQuantity ¶
func GetGPUQuantity(resList core.ResourceList) int64
func GetMemoryQuantity ¶
func GetMemoryQuantity(resList core.ResourceList) int64
func GetNodeHostIP ¶
func GetNodeKey ¶
func GetNodeKey(key interface{}) string
func GetNodeLabelValue ¶
func GetPodFrameworkKey ¶
func GetPodFrameworkName ¶
func GetZoneKey ¶
func GetZoneKey(key interface{}) string
func HasPrefixNode ¶
func HasPrefixNode(key interface{}) bool
func HasPrefixPod ¶
func HasPrefixPod(key interface{}) bool
func HasPrefixZone ¶
func HasPrefixZone(key interface{}) bool
func LogFrameworks ¶
func LogFrameworks(prefix string, fm map[string]*SkdFramework, lock *sync.RWMutex)
func ReadUnlock ¶
func TestScheduleCategory ¶
func WriteUnlock ¶
Types ¶
type ExpectedFrameworkStatusInfo ¶
type ExpectedFrameworkStatusInfo struct {
// contains filtered or unexported fields
}
type FrameworkController ¶
type FrameworkController struct {
// contains filtered or unexported fields
}
FrameworkController maintains the lifecycle for all Frameworks in the cluster. It is the engine to transition the Framework.Status and other Framework related objects to satisfy the Framework.Spec eventually.
func NewFrameworkController ¶
func NewFrameworkController() *FrameworkController
func (*FrameworkController) Run ¶
func (c *FrameworkController) Run(stopCh <-chan struct{})
type FrameworkScheduler ¶
type FrameworkScheduler struct {
// contains filtered or unexported fields
}
func NewFrameworkScheduler ¶
func NewFrameworkScheduler(c *FrameworkController) *FrameworkScheduler
func (*FrameworkScheduler) CreateSkdZone ¶
func (s *FrameworkScheduler) CreateSkdZone(category string, zone string) *SkdZone
type InterdomScheduler ¶
type InterdomScheduler struct {
// contains filtered or unexported fields
}
func NewInterdomScheduler ¶
func NewInterdomScheduler(myfc *FrameworkController) *InterdomScheduler
func (*InterdomScheduler) Run ¶
func (is *InterdomScheduler) Run(stopCh <-chan struct{})
type SkdFramework ¶
type SkdFramework struct { Key string Name string Namespace string ScheduleCategory string ScheduleZone string QueuingTimestamp time.Time Zone *SkdZone Resources SkdResourceRequirements LastSync time.Time }
func NewSdkFramework ¶
func NewSdkFramework(f *ci.Framework) *SkdFramework
type SkdNode ¶
type SkdNode struct { Key string ScheduleCategory string ScheduleZone string Zone *SkdZone HostIP string Capacity SkdResources Allocatable SkdResources Allocated SkdResources Free SkdResources Pods map[string]*SkdPod LastInformed time.Time // contains filtered or unexported fields }
type SkdResourceRequirements ¶
type SkdResourceRequirements struct { Limits SkdResources Requests SkdResources }
func GetFrameworkResources ¶
func GetFrameworkResources(f *ci.Framework) SkdResourceRequirements
type SkdResources ¶
func GetNodeAllocatable ¶
func GetNodeAllocatable(node *core.Node) SkdResources
func GetNodeCapacity ¶
func GetNodeCapacity(node *core.Node) SkdResources
func GetPodResourceLimits ¶
func GetPodResourceLimits(kPod *core.Pod) (res SkdResources)
func GetPodResourceRequests ¶
func GetPodResourceRequests(kPod *core.Pod) (res SkdResources)
type SkdZone ¶
type SkdZone struct { Key string ScheduleCategory string ScheduleZone string TotalCapacity SkdResources TotalAllocated SkdResources TotalFree SkdResources TotalProvision SkdResources Nodes map[string]*SkdNode LastInformed time.Time Alive bool // contains filtered or unexported fields }
func (*SkdZone) RefreshTotalCapacity ¶
func (z *SkdZone) RefreshTotalCapacity()
Click to show internal directories.
Click to hide internal directories.