controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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