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 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
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 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 IsHugepagesEnabled() bool HugepageSizeKb() int IsNumaAllocateEnabled() bool CpuCmtBound() int IsKvmSupport() bool IsNestedVirtualization() bool PutHostOnline() error StartDHCPServer() GetBridgeDev(bridge string) hostbridge.IBridgeDriver GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager GetKubeletConfig() kubelet.KubeletConfig OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3) }
Click to show internal directories.
Click to hide internal directories.