Documentation ¶
Index ¶
- Variables
- func DelayKubeTask(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
- func DelayTask(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
- func DelayTaskWithWorker(ctx context.Context, task workmanager.DelayTaskFunc, params interface{}, ...)
- func DelayTaskWithoutReqctx(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
- func GetComputeSession(ctx context.Context) *mcclient.ClientSession
- func GetImageSession(ctx context.Context) *mcclient.ClientSession
- func GetK8sSession(ctx context.Context) *mcclient.ClientSession
- func GetWireInfo(ctx context.Context, wireId string) (jsonutils.JSONObject, error)
- func GetWireOfIp(ctx context.Context, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func GetWorkManager() *workmanager.SWorkManager
- func Init()
- func InitK8sWorkerManager()
- func InitWorkerManager()
- func InitWorkerManagerWithCount(count int)
- func IsGuestDir(f os.FileInfo, serversPath string) bool
- func K8sTaskComplete(ctx context.Context, params jsonutils.JSONObject)
- func K8sTaskFailed(ctx context.Context, reason string)
- func RemoteStoragecacheCacheImage(ctx context.Context, storagecacheId, imageId, status, spath string) (jsonutils.JSONObject, error)
- func Response(ctx context.Context, w http.ResponseWriter, res interface{})
- func ResponseOk(ctx context.Context, w http.ResponseWriter)
- func TaskComplete(ctx context.Context, params jsonutils.JSONObject)
- func TaskFailed(ctx context.Context, reason string)
- func TaskFailed2(ctx context.Context, reason string, params *jsonutils.JSONDict)
- func UpdateContainerStatus(ctx context.Context, cid string, ...) (jsonutils.JSONObject, error)
- func UpdateResourceStatus(ctx context.Context, man modulebase.IResourceManager, id string, ...) (jsonutils.JSONObject, error)
- func UpdateServerProgress(ctx context.Context, sid string, progress, progressMbps float64) (jsonutils.JSONObject, error)
- func UpdateServerStatus(ctx context.Context, sid string, statusInput *apis.PerformStatusInput) (jsonutils.JSONObject, error)
- type IHost
- type SContainerCpufreqSimulateConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ParamsError = fmt.Errorf("Delay task parse params error")
)
Functions ¶
func DelayKubeTask ¶
func DelayKubeTask(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
func DelayTask ¶
func DelayTask(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
func DelayTaskWithWorker ¶
func DelayTaskWithWorker( ctx context.Context, task workmanager.DelayTaskFunc, params interface{}, worker *appsrv.SWorkerManager, )
func DelayTaskWithoutReqctx ¶
func DelayTaskWithoutReqctx(ctx context.Context, task workmanager.DelayTaskFunc, params interface{})
func GetComputeSession ¶
func GetComputeSession(ctx context.Context) *mcclient.ClientSession
func GetImageSession ¶
func GetImageSession(ctx context.Context) *mcclient.ClientSession
func GetK8sSession ¶
func GetK8sSession(ctx context.Context) *mcclient.ClientSession
func GetWireInfo ¶
func GetWireOfIp ¶
func GetWireOfIp(ctx context.Context, params jsonutils.JSONObject) (jsonutils.JSONObject, error)
func GetWorkManager ¶
func GetWorkManager() *workmanager.SWorkManager
func InitK8sWorkerManager ¶
func InitK8sWorkerManager()
func InitWorkerManager ¶
func InitWorkerManager()
func InitWorkerManagerWithCount ¶
func InitWorkerManagerWithCount(count int)
func K8sTaskComplete ¶
func K8sTaskComplete(ctx context.Context, params jsonutils.JSONObject)
func K8sTaskFailed ¶
func ResponseOk ¶
func ResponseOk(ctx context.Context, w http.ResponseWriter)
func TaskComplete ¶
func TaskComplete(ctx context.Context, params jsonutils.JSONObject)
func TaskFailed ¶
func UpdateContainerStatus ¶
func UpdateContainerStatus(ctx context.Context, cid string, statusInput *computeapi.ContainerPerformStatusInput) (jsonutils.JSONObject, error)
func UpdateResourceStatus ¶
func UpdateResourceStatus(ctx context.Context, man modulebase.IResourceManager, id string, statusInput *apis.PerformStatusInput) (jsonutils.JSONObject, error)
func UpdateServerProgress ¶
func UpdateServerStatus ¶
func UpdateServerStatus(ctx context.Context, sid string, statusInput *apis.PerformStatusInput) (jsonutils.JSONObject, error)
Types ¶
type IHost ¶
type IHost interface { GetZoneId() string GetHostId() string GetMasterIp() string GetCpuArchitecture() string GetKernelVersion() string IsAarch64() bool IsX8664() bool GetHostTopology() *hostapi.HostTopology GetReservedCpusInfo() *cpuset.CPUSet GetReservedMemMb() int IsHugepagesEnabled() bool HugepageSizeKb() int IsNumaAllocateEnabled() bool CpuCmtBound() float32 MemCmtBound() float32 IsKvmSupport() bool IsNestedVirtualization() bool PutHostOnline() error StartDHCPServer() GetBridgeDev(bridge string) hostbridge.IBridgeDriver GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager GetKubeletConfig() kubelet.KubeletConfig // containerd related methods IsContainerHost() bool GetContainerRuntimeEndpoint() string GetCRI() pod.CRI GetContainerCPUMap() *pod.HostContainerCPUMap GetContainerCpufreqSimulateConfig() *jsonutils.JSONDict OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3) }
type SContainerCpufreqSimulateConfig ¶
type SContainerCpufreqSimulateConfig struct { CpuinfoMaxFreq int `json:"cpuinfo_max_freq"` CpuinfoMinFreq int `json:"cpuinfo_min_freq"` CpuinfoCurFreq int `json:"cpuinfo_cur_freq"` CpuinfoTransitionLatency int `json:"cpuinfo_transition_latency"` ScalingDriver string `json:"scaling_driver"` ScalingGovernors string `json:"scaling_governor"` ScalingMaxFreq int `json:"scaling_max_freq"` ScalingMinFreq int `json:"scaling_min_freq"` ScalingCurFreq int `json:"scaling_cur_freq"` ScalingSetspeed string `json:"scaling_setspeed"` ScalingAvailableGovernors string `json:"scaling_available_governors"` }
Click to show internal directories.
Click to hide internal directories.