1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-16 00:26:43 +00:00
Files
YAO-scheduler/src/scheduler.go
2020-04-30 21:22:21 +08:00

42 lines
653 B
Go

package main
type Scheduler interface {
Start()
Schedule(Job)
UpdateProgress(jobName string, state State)
AcquireResource(Job, Task, []NodeStatus) NodeStatus
ReleaseResource(Job, NodeStatus)
AcquireNetwork() string
ReleaseNetwork(network string)
QueryState(jobName string) MsgJobStatus
QueryLogs(jobName string, taskName string) MsgLog
Stop(jobName string) MsgStop
ListJobs() MsgJobList
Summary() MsgSummary
Attach(GPU string, job string)
Detach(GPU string, job string)
Enable() bool
Disable() bool
UpdateParallelism(parallelism int) bool
SetShareRatio(ratio float64) bool
SetPreScheduleRatio(ratio float64) bool
}