mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-16 00:26:43 +00:00
update
This commit is contained in:
83
src/message.go
Normal file
83
src/message.go
Normal file
@@ -0,0 +1,83 @@
|
||||
package main
|
||||
|
||||
type MsgSubmit struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
type MsgPoolStatusHistory struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Data []PoolStatus `json:"data"`
|
||||
}
|
||||
|
||||
type MsgStop struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
type MsgSummary struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
JobsFinished int `json:"jobs_finished"`
|
||||
JobsRunning int `json:"jobs_running"`
|
||||
JobsPending int `json:"jobs_pending"`
|
||||
FreeGPU int `json:"gpu_free"`
|
||||
UsingGPU int `json:"gpu_using"`
|
||||
}
|
||||
|
||||
type MsgJobList struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Jobs []Job `json:"jobs"`
|
||||
}
|
||||
|
||||
type MsgLog struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Logs string `json:"logs"`
|
||||
}
|
||||
|
||||
type MsgTaskStatus struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Status TaskStatus `json:"status"`
|
||||
}
|
||||
|
||||
type MsgJobStatus struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Status []TaskStatus `json:"status"`
|
||||
}
|
||||
|
||||
type MsgCreate struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
type MsgResource struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Resource map[string]NodeStatus `json:"resources"`
|
||||
}
|
||||
|
||||
type MsgGroupCreate struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
type MsgGroupList struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Groups []Group `json:"groups"`
|
||||
}
|
||||
|
||||
type MsgOptimizerPredict struct {
|
||||
Code int `json:"code"`
|
||||
Error string `json:"error"`
|
||||
Total int `json:"total"`
|
||||
Pre int `json:"pre"`
|
||||
Main int `json:"main"`
|
||||
Post int `json:"post"`
|
||||
}
|
||||
Reference in New Issue
Block a user