Documentation
¶
Index ¶
- Constants
- func AppsParseToPod(rc string, data io.Reader) ([]NodeConfig, MutiAppsRequest, error)
- func GetMasterFromKubeConfig(filename string) (string, error)
- func GetUID(uid string) types.UID
- func ParseDeployToPod(deploy *appsv1.Deployment) (*v1.Pod, int32, error)
- func ParseStatefulSetToPod(statefulset *appsv1.StatefulSet) (*v1.Pod, int32, error)
- func ParseToPod(rc string, data io.Reader) (*v1.Pod, int32, error)
- func PrintPod(pod *v1.Pod, format string) error
- type AppGroup
- type Apps
- type MutiAppsRequest
- type NodeCapacity
- type NodeConfig
- type NodeInfo
- type NodeInfoList
- type Option
- type PodRequest
- type PodsConfig
- type PodsInfo
- type SimulatorJob
Constants ¶
View Source
const DefaultSchedulerName = "default-scheduler"
Variables ¶
This section is empty.
Functions ¶
func AppsParseToPod ¶
func AppsParseToPod(rc string, data io.Reader) ([]NodeConfig, MutiAppsRequest, error)
ParseToPod, convert deployment or statefulset to v1.pod
func GetMasterFromKubeConfig ¶
func ParseDeployToPod ¶
func ParseStatefulSetToPod ¶
ParseToPod, convert deployment or statefulset to v1.pod
func ParseToPod ¶
ParseToPod, convert deployment or statefulset to v1.pod
Types ¶
type AppGroup ¶
type AppGroup struct { EmulatorType string `json:"emulatorType"` Nodes []NodeConfig `json:"nodes"` Apps []PodRequest `json:"apps"` OldPods []v1.Pod `json:"odlPods"` PodsConfig *PodsConfig `json:"podsConfig"` }
type Apps ¶
type Apps struct { Nodes []NodeConfig `json:"nodes"` DeployApps []*appsv1.Deployment `json:"deployApps"` StatefulsetApps []*appsv1.StatefulSet `json:"statefulsetApps"` }
type MutiAppsRequest ¶
type MutiAppsRequest struct {
PodRequestList []PodRequest
}
type NodeCapacity ¶
type NodeConfig ¶
type NodeConfig struct { NodeNumber int `json:"nodeNumber"` NodeCapacity *NodeCapacity `json:"nodeCapacity"` NodeLabels map[string]string `json:"nodeLabels"` }
func NodeConfigParse ¶
func NodeConfigParse(data io.Reader) (*NodeConfig, error)
type NodeInfoList ¶
type NodeInfoList struct { NodeNumber int `json:"nodeNumber"` PodNumber int `json:"podNumber"` RunningPod int `json:"runingPod"` Status v1.PodPhase `json:"status"` NotRunningPod int `json:"notRuningPod"` NodeInfoPodNumber int `json:"nodeInfoPodNumber"` NodeInfoNumber int `json:"nodeInfoNumber"` NotNodeInfoNumber int `json:"notNodeInfoNumber"` BindFailed int `json:"bindFailed"` BindSuccess int `json:"bindSuccess"` NodePods map[string]int `json:"nodePods"` NodeInfoPods map[string]int `json:"nodeInfoPods"` NodeList *v1.NodeList `json:"nodeList"` }
type PodRequest ¶
type PodsConfig ¶
func PodsConfigParse ¶
func PodsConfigParse(data io.Reader) (*PodsConfig, error)
type SimulatorJob ¶
type SimulatorJob struct {
Id string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.