Documentation
¶
Index ¶
- func DumpConfig(sflags interface{}) error
- func EnsureAPIService(aggregatorClient clientset.Interface, cacert []byte) error
- func GetBusyDeviceSet(prl []*jsonstruct.PodResourcesDetail) sets.String
- func GetKubeAndAggregatorClientset() (kubernetes.Interface, clientset.Interface, error)
- func GetListener(sflags *options.MetricsPodResourceFlags, cfg *tls.Config) (listener net.Listener, err error)
- func GetPodRequestGpuNum(pod *corev1.Pod) int64
- func GetTlsConfig(certs *generator.Artifacts) (*tls.Config, error)
- func LogOrWriteConfig(fileName string, sflags interface{}) error
- func MapSetToList(mapset map[string]sets.String) map[string][]string
- func NodeStatusToGpuInfoStatus(status *NodeStatus) *apis.GpuInfoStatus
- func PodResourcesDetailToPodResource(prdList []*jsonstruct.PodResourcesDetail) []*apis.PodResource
- func WriteJSON(w http.ResponseWriter, code int, v interface{}) error
- type NodeGpuInfoMap
- func (gim *NodeGpuInfoMap) DumpNodeGpuInfo() string
- func (gim *NodeGpuInfoMap) GetAllNodeGpuInfo() []*NodeGpuInfo
- func (gim *NodeGpuInfoMap) GetNodeDeviceInUse(node string) (value sets.String)
- func (gim *NodeGpuInfoMap) GetNodeGpuInfo(node string) (value *NodeGpuInfo, exist bool)
- func (gim *NodeGpuInfoMap) SetNodeDeviceInUse(node string, deviceInUse sets.String)
- func (gim *NodeGpuInfoMap) SetNodeGpuInfo(node string, value *NodeGpuInfo)
- type NodeStatus
- type NodeStatusMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpConfig ¶
func DumpConfig(sflags interface{}) error
func EnsureAPIService ¶
EnsureAPIService ensure the apiservice.spec.caBundle is fresh
func GetBusyDeviceSet ¶
func GetBusyDeviceSet(prl []*jsonstruct.PodResourcesDetail) sets.String
func GetKubeAndAggregatorClientset ¶
func GetKubeAndAggregatorClientset() (kubernetes.Interface, clientset.Interface, error)
func GetListener ¶
func GetListener(sflags *options.MetricsPodResourceFlags, cfg *tls.Config) (listener net.Listener, err error)
GetListener get standard net Listener with server config and tls config.
func GetPodRequestGpuNum ¶
func GetTlsConfig ¶
GetTlsConfig get tls config with server config certs files.
func LogOrWriteConfig ¶
func NodeStatusToGpuInfoStatus ¶
func NodeStatusToGpuInfoStatus(status *NodeStatus) *apis.GpuInfoStatus
func PodResourcesDetailToPodResource ¶
func PodResourcesDetailToPodResource(prdList []*jsonstruct.PodResourcesDetail) []*apis.PodResource
Types ¶
type NodeGpuInfoMap ¶
struct to store gpu info from all nodes
func NewNodeGpuInfoMap ¶
func NewNodeGpuInfoMap() *NodeGpuInfoMap
func (*NodeGpuInfoMap) DumpNodeGpuInfo ¶
func (gim *NodeGpuInfoMap) DumpNodeGpuInfo() string
func (*NodeGpuInfoMap) GetAllNodeGpuInfo ¶
func (gim *NodeGpuInfoMap) GetAllNodeGpuInfo() []*NodeGpuInfo
func (*NodeGpuInfoMap) GetNodeDeviceInUse ¶
func (gim *NodeGpuInfoMap) GetNodeDeviceInUse(node string) (value sets.String)
func (*NodeGpuInfoMap) GetNodeGpuInfo ¶
func (gim *NodeGpuInfoMap) GetNodeGpuInfo(node string) (value *NodeGpuInfo, exist bool)
func (*NodeGpuInfoMap) SetNodeDeviceInUse ¶
func (gim *NodeGpuInfoMap) SetNodeDeviceInUse(node string, deviceInUse sets.String)
func (*NodeGpuInfoMap) SetNodeGpuInfo ¶
func (gim *NodeGpuInfoMap) SetNodeGpuInfo(node string, value *NodeGpuInfo)
type NodeStatusMap ¶
struct to store node status info from NodeHealthChecker
func NewNodeStatusMap ¶
func NewNodeStatusMap() *NodeStatusMap
func (*NodeStatusMap) GetNodeStatus ¶
func (gim *NodeStatusMap) GetNodeStatus(node string) (value *NodeStatus, exist bool)
func (*NodeStatusMap) ListNodeStatus ¶
func (gim *NodeStatusMap) ListNodeStatus() []*NodeStatus
func (*NodeStatusMap) SetNodeGpuInfo ¶
func (gim *NodeStatusMap) SetNodeGpuInfo(node string, value *NodeStatus)
Click to show internal directories.
Click to hide internal directories.