Documentation
¶
Index ¶
- type NodeHealthChecker
- type ServerController
- func (sc *ServerController) AddWatcher(chprd chan *PodResourceUpdate) string
- func (sc *ServerController) DelWatcher(watch_uuid string)
- func (sc *ServerController) GetFromStore() <-chan []*PodResourcesDetail
- func (sc *ServerController) GetNodeGpuInfoMap() *serverutil.NodeGpuInfoMap
- func (sc *ServerController) GetParallelism() int
- func (sc *ServerController) SendToStore(pru *PodResourceUpdate)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeHealthChecker ¶
type NodeHealthChecker struct {
// contains filtered or unexported fields
}
NodeHealthChecker checks node status. It Start check each interval and never stop until stop chan signal. According to the http check from the gpuserver-ds /health?node=nodename. If the gpuserver-ds not check in a period of time (NodeHealthChecker_NodeTTL) then mark it unhealthy.
func NewNodeHealthChecker ¶
func NewNodeHealthChecker(checkInterval time.Duration, nodeStatusTTL time.Duration, stop <-chan struct{}) *NodeHealthChecker
func (*NodeHealthChecker) GetNodeStatus ¶
func (nhc *NodeHealthChecker) GetNodeStatus(node string) *serverutil.NodeStatus
func (*NodeHealthChecker) GetNodeStatusIndex ¶
func (nhc *NodeHealthChecker) GetNodeStatusIndex() *serverutil.NodeStatusMap
func (*NodeHealthChecker) NotifyHealth ¶
func (nhc *NodeHealthChecker) NotifyHealth(node string)
func (*NodeHealthChecker) Start ¶
func (nhc *NodeHealthChecker) Start() error
type ServerController ¶
type ServerController struct {
NHC *NodeHealthChecker
FW framework.Framework
FWNI *nodeinfo.NodeInfo
// contains filtered or unexported fields
}
ServerController is the main controller to process api requests. Index the pod gpu usage info with podresourcesIndex. Index the node gpu info with nodegpuinfomap.
func NewServerController ¶
func NewServerController(nhc *NodeHealthChecker, parallelism int, stop <-chan struct{}) (*ServerController, error)
func (*ServerController) AddWatcher ¶
func (sc *ServerController) AddWatcher(chprd chan *PodResourceUpdate) string
func (*ServerController) DelWatcher ¶
func (sc *ServerController) DelWatcher(watch_uuid string)
func (*ServerController) GetFromStore ¶
func (sc *ServerController) GetFromStore() <-chan []*PodResourcesDetail
func (*ServerController) GetNodeGpuInfoMap ¶
func (sc *ServerController) GetNodeGpuInfoMap() *serverutil.NodeGpuInfoMap
func (*ServerController) GetParallelism ¶
func (sc *ServerController) GetParallelism() int
func (*ServerController) SendToStore ¶
func (sc *ServerController) SendToStore(pru *PodResourceUpdate)
Click to show internal directories.
Click to hide internal directories.