Documentation ¶
Index ¶
- func DumpConfig(sflags interface{})
- func EnsureAPIService(aggregatorClient clientset.Interface, cacert []byte) error
- func GetGpuNodeHasSynced(ctx context.Context, mgr manager.Manager, object client.Object) (cache.InformerSynced, error)
- func GetKubeAndAggregatorClientset() (restconf *rest.Config, kubeClient kubernetes.Interface, ...)
- 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 WriteJSON(w http.ResponseWriter, code int, v interface{})
- 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{})
func EnsureAPIService ¶
EnsureAPIService ensure the apiservice.spec.caBundle is fresh
func GetGpuNodeHasSynced ¶ added in v0.2.0
func GetKubeAndAggregatorClientset ¶
func GetKubeAndAggregatorClientset() (restconf *rest.Config, kubeClient kubernetes.Interface, aggregatorClient clientset.Interface, gpuClient gpuclientset.Interface, gpuPodClient gpupodclientset.Interface, err error)
func GetPodRequestGpuNum ¶
func GetTlsConfig ¶
GetTlsConfig get tls config with server config certs files.
func LogOrWriteConfig ¶
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, code int, v interface{})
WriteJSON send back http stream, encode the value v with standard json encoding.
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.