Documentation ¶
Index ¶
- func NewInitService()
- type AsyncExecutorService
- type DownloadService
- func (s *DownloadService) AddTasks(req []v1.DownloadReq) (err error)
- func (s *DownloadService) CancelTask(taskId uint)
- func (s *DownloadService) RemoveTask(req v1.DownloadReq)
- func (s *DownloadService) RestartTask(po agentModel.Task) (ret bool)
- func (s *DownloadService) StartTask(po agentModel.Task)
- func (s *DownloadService) StopTask(taskId uint)
- type ExportService
- type HostService
- type InitService
- type SnapService
- func (s *SnapService) AddTasks(req []v1.SnapTaskReq) (err error)
- func (s *SnapService) GetVmSnaps(vm string) (snaps []string)
- func (s *SnapService) ListSnap(vm string) (ret []v1.SnapItemResp, err error)
- func (s *SnapService) RemoveSnap(req *v1.SnapTaskReq) (err error)
- func (s *SnapService) RemoveSnapsByVmName(vm string) (err error)
- func (s *SnapService) RemoveTask(req v1.DownloadReq)
- func (s *SnapService) StartCreateSnapTask(po agentModel.Task)
- func (s *SnapService) StartRevertSnapTask(po agentModel.Task)
- type StatusService
- type TaskService
- func (s *TaskService) CheckTask() (err error)
- func (s *TaskService) IsError(po agentModel.Task) bool
- func (s *TaskService) IsTimeout(po agentModel.Task) bool
- func (s *TaskService) ListTask() (ret v1.ListTaskResp, err error)
- func (s *TaskService) NeedRetry(po agentModel.Task) bool
- func (s *TaskService) SubmitResult(task agentModel.Task) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInitService ¶
func NewInitService()
Types ¶
type AsyncExecutorService ¶
type AsyncExecutorService struct { }
func (*AsyncExecutorService) Exec ¶
func (s *AsyncExecutorService) Exec(po *agentModel.Task, uuidStr string, opt func(*agentModel.Task) (consts.TaskStatus, string)) ( status consts.TaskStatus, result string)
type DownloadService ¶
type DownloadService struct { TaskService *TaskService `inject:""` TaskRepo *hostRepo.TaskRepo `inject:""` }
func NewDownloadService ¶
func NewDownloadService() *DownloadService
func (*DownloadService) AddTasks ¶
func (s *DownloadService) AddTasks(req []v1.DownloadReq) (err error)
func (*DownloadService) CancelTask ¶
func (s *DownloadService) CancelTask(taskId uint)
func (*DownloadService) RemoveTask ¶
func (s *DownloadService) RemoveTask(req v1.DownloadReq)
func (*DownloadService) RestartTask ¶
func (s *DownloadService) RestartTask(po agentModel.Task) (ret bool)
func (*DownloadService) StartTask ¶
func (s *DownloadService) StartTask(po agentModel.Task)
func (*DownloadService) StopTask ¶
func (s *DownloadService) StopTask(taskId uint)
type ExportService ¶
type ExportService struct { TaskService *TaskService `inject:""` LibvirtService *kvmService.LibvirtService `inject:""` QemuService *kvmService.QemuService `inject:""` KvmService *kvmService.KvmService `inject:""` TaskRepo *hostRepo.TaskRepo `inject:""` }
func NewExportService ¶
func NewExportService() *ExportService
func (*ExportService) StartTask ¶
func (s *ExportService) StartTask(po agentModel.Task)
type HostService ¶
type HostService struct { VmService *hostKvmService.KvmService `inject:""` JobService *agentService.JobService `inject:""` TestService *agentTestingService.RunService `inject:""` }
func NewHostService ¶
func NewHostService() *HostService
func (*HostService) Check ¶
func (s *HostService) Check()
func (*HostService) PassEnvsToContainerIfNeeded ¶
func (s *HostService) PassEnvsToContainerIfNeeded(build *domain.Build)
func (*HostService) Register ¶
func (s *HostService) Register(isBusy bool)
type InitService ¶
type InitService struct { }
func (*InitService) InitModels ¶
func (s *InitService) InitModels()
type SnapService ¶
type SnapService struct { SyncHeartbeatMap sync.Map TimeStamp int64 LibvirtService *kvmService.LibvirtService `inject:""` QemuService *kvmService.QemuService `inject:""` KvmService *kvmService.KvmService `inject:""` TaskRepo *hostRepo.TaskRepo `inject:""` TaskService *TaskService `inject:""` AsyncExecutorService *AsyncExecutorService `inject:""` }
func NewAsyncExecutor ¶
func NewAsyncExecutor() *SnapService
func NewSnapService ¶
func NewSnapService() *SnapService
func (*SnapService) AddTasks ¶
func (s *SnapService) AddTasks(req []v1.SnapTaskReq) (err error)
func (*SnapService) GetVmSnaps ¶
func (s *SnapService) GetVmSnaps(vm string) (snaps []string)
func (*SnapService) ListSnap ¶
func (s *SnapService) ListSnap(vm string) (ret []v1.SnapItemResp, err error)
ListSnap 列出快照
func (*SnapService) RemoveSnap ¶
func (s *SnapService) RemoveSnap(req *v1.SnapTaskReq) (err error)
func (*SnapService) RemoveSnapsByVmName ¶
func (s *SnapService) RemoveSnapsByVmName(vm string) (err error)
RemoveSnapsByVmName 删除虚拟机下所有快照
func (*SnapService) RemoveTask ¶
func (s *SnapService) RemoveTask(req v1.DownloadReq)
func (*SnapService) StartCreateSnapTask ¶
func (s *SnapService) StartCreateSnapTask(po agentModel.Task)
func (*SnapService) StartRevertSnapTask ¶
func (s *SnapService) StartRevertSnapTask(po agentModel.Task)
type StatusService ¶
type StatusService struct {
LibvirtService *kvmService.LibvirtService `inject:""`
}
func NewStatusService ¶
func NewStatusService() *StatusService
func (*StatusService) Check ¶
func (s *StatusService) Check(req v1.HostServiceCheckReq) (ret v1.HostServiceCheckResp, err error)
type TaskService ¶
type TaskService struct { DownloadService *DownloadService `inject:""` ExportService *ExportService `inject:""` SnapService *SnapService `inject:""` TaskRepo *hostRepo.TaskRepo `inject:""` }
func NewTaskService ¶
func NewTaskService() *TaskService
func (*TaskService) CheckTask ¶
func (s *TaskService) CheckTask() (err error)
func (*TaskService) IsError ¶
func (s *TaskService) IsError(po agentModel.Task) bool
func (*TaskService) IsTimeout ¶
func (s *TaskService) IsTimeout(po agentModel.Task) bool
func (*TaskService) ListTask ¶
func (s *TaskService) ListTask() (ret v1.ListTaskResp, err error)
func (*TaskService) NeedRetry ¶
func (s *TaskService) NeedRetry(po agentModel.Task) bool
func (*TaskService) SubmitResult ¶
func (s *TaskService) SubmitResult(task agentModel.Task) (err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.