查询p端列表信息
Former-commit-id: 4da76886f5de6c1939d5d9011acc37fc237d4043
This commit is contained in:
parent
7313ee2446
commit
ae939a78a0
|
@ -402,8 +402,8 @@ type (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
type(
|
type (
|
||||||
ComputilityStatisticsResp{
|
ComputilityStatisticsResp {
|
||||||
Code int32 `json:"code,omitempty"`
|
Code int32 `json:"code,omitempty"`
|
||||||
Msg string `json:"msg,omitempty"`
|
Msg string `json:"msg,omitempty"`
|
||||||
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
ErrorMsg string `json:"ErrorMsg,omitempty"`
|
||||||
|
@ -484,3 +484,15 @@ type HashCat {
|
||||||
CrackProgress string `json:"crackProgress"` // 进度
|
CrackProgress string `json:"crackProgress"` // 进度
|
||||||
CrackResult string `json:"crackResult"` // 结果
|
CrackResult string `json:"crackResult"` // 结果
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type participantListResp {
|
||||||
|
Participants []Participant `json:"participants"`
|
||||||
|
}
|
||||||
|
type Participant {
|
||||||
|
id int64 `json:"id"`
|
||||||
|
name string `json:"name"`
|
||||||
|
address string `json:"address"`
|
||||||
|
metricsUrl string `json:"metricsUrl"`
|
||||||
|
tenantName string `json:"tenantName"`
|
||||||
|
typeName string `json:"typeName"`
|
||||||
|
}
|
|
@ -23,6 +23,10 @@ info(
|
||||||
group : core
|
group : core
|
||||||
)
|
)
|
||||||
service pcm {
|
service pcm {
|
||||||
|
|
||||||
|
@handler participantListHandler
|
||||||
|
get /core/participantList () returns (participantListResp)
|
||||||
|
|
||||||
@handler scheduleTaskByYamlHandler
|
@handler scheduleTaskByYamlHandler
|
||||||
post /core/scheduleTaskByYaml (scheduleTaskByYamlReq) returns ()
|
post /core/scheduleTaskByYaml (scheduleTaskByYamlReq) returns ()
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,11 @@ import (
|
||||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||||
server.AddRoutes(
|
server.AddRoutes(
|
||||||
[]rest.Route{
|
[]rest.Route{
|
||||||
|
{
|
||||||
|
Method: http.MethodGet,
|
||||||
|
Path: "/core/participantList",
|
||||||
|
Handler: core.ParticipantListHandler(serverCtx),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Method: http.MethodPost,
|
Method: http.MethodPost,
|
||||||
Path: "/core/scheduleTaskByYaml",
|
Path: "/core/scheduleTaskByYaml",
|
||||||
|
|
|
@ -454,6 +454,19 @@ type HashCat struct {
|
||||||
CrackResult string `json:"crackResult"` // 结果
|
CrackResult string `json:"crackResult"` // 结果
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ParticipantListResp struct {
|
||||||
|
Participants []Participant `json:"participants"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Participant struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Address string `json:"address"`
|
||||||
|
MetricsUrl string `json:"metricsUrl"`
|
||||||
|
TenantName string `json:"tenantName"`
|
||||||
|
TypeName string `json:"typeName"`
|
||||||
|
}
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
SlurmVersion string `json:"slurmVersion"`
|
SlurmVersion string `json:"slurmVersion"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
Loading…
Reference in New Issue