查询p端列表信息
Former-commit-id: 4da76886f5de6c1939d5d9011acc37fc237d4043
This commit is contained in:
parent
7313ee2446
commit
ae939a78a0
|
@ -402,17 +402,17 @@ 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"`
|
||||||
ComputilityStatistics ComputilityStatistics `json:"data"` //容器节点已使用
|
ComputilityStatistics ComputilityStatistics `json:"data"` //容器节点已使用
|
||||||
}
|
}
|
||||||
ComputilityStatistics {
|
ComputilityStatistics {
|
||||||
DomainSum int64 `json:"domainSum"` //域总数
|
DomainSum int64 `json:"domainSum"` //域总数
|
||||||
TotalComputility float64 `json:"totalComputility"` //算力总和
|
TotalComputility float64 `json:"totalComputility"` //算力总和
|
||||||
ClusterNum int64 `json:"clusterNum"` //集群总数
|
ClusterNum int64 `json:"clusterNum"` //集群总数
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -458,13 +458,13 @@ type NodeAsset {
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveHashcatReq {
|
type SaveHashcatReq {
|
||||||
CrackTaskId string `json:"crackTaskId"` // 任务id
|
CrackTaskId string `json:"crackTaskId"` // 任务id
|
||||||
CrackContainerId string `json:"crackContainerId"` // 容器id
|
CrackContainerId string `json:"crackContainerId"` // 容器id
|
||||||
CrackStatus string `json:"crackStatus"` // 状态
|
CrackStatus string `json:"crackStatus"` // 状态
|
||||||
CrackStartTime string `json:"crackStartTime"` //开始时间
|
CrackStartTime string `json:"crackStartTime"` //开始时间
|
||||||
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
|
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
|
||||||
CrackProgress string `json:"crackProgress"` // 进度
|
CrackProgress string `json:"crackProgress"` // 进度
|
||||||
CrackResult string `json:"crackResult"` // 结果
|
CrackResult string `json:"crackResult"` // 结果
|
||||||
}
|
}
|
||||||
|
|
||||||
type getHashcatHandlerReq {
|
type getHashcatHandlerReq {
|
||||||
|
@ -476,11 +476,23 @@ type getHashcatHandlerResp {
|
||||||
}
|
}
|
||||||
|
|
||||||
type HashCat {
|
type HashCat {
|
||||||
CrackTaskId string `json:"crackTaskId"` // 任务id
|
CrackTaskId string `json:"crackTaskId"` // 任务id
|
||||||
CrackContainerId string `json:"crackContainerId"` // 容器id
|
CrackContainerId string `json:"crackContainerId"` // 容器id
|
||||||
CrackStatus string `json:"crackStatus"` // 状态
|
CrackStatus string `json:"crackStatus"` // 状态
|
||||||
CrackStartTime string `json:"crackStartTime"` //开始时间
|
CrackStartTime string `json:"crackStartTime"` //开始时间
|
||||||
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
|
CrackEstimatedTime string `json:"crackEstimatedTime"` // 预计时间
|
||||||
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