SHA-4096 commented on code in PR #286: URL: https://github.com/apache/dubbo-kubernetes/pull/286#discussion_r1611679488
########## pkg/admin/model/instance.go: ########## @@ -73,3 +78,105 @@ type State struct { Tip string `json:"tip"` Value string `json:"value"` } + +type InstanceDetailResp struct { + RpcPort []string `json:"rpcPort"` + Ip []string `json:"ip"` + AppName []string `json:"appName"` + WorkloadName []string `json:"workloadName"` + Labels []string `json:"labels"` + CreateTime []string `json:"createTime"` + ReadyTime []string `json:"readyTime"` + RegisterTime []string `json:"registerTime"` + RegisterCluster []string `json:"registerCluster"` + DeployCluster []string `json:"deployCluster"` + Node []string `json:"node"` + Image []string `json:"image"` + Probes struct { + StartupProbe struct { + Type string `json:"type"` + Port int `json:"port"` + Open bool `json:"open"` + } `json:"startupProbe"` + ReadinessProbe struct { + Type string `json:"type"` + Port int `json:"port"` + Open bool `json:"open"` + } `json:"readinessProbe"` + LivenessProbe struct { + Type string `json:"type"` + Port int `json:"port"` + Open bool `json:"open"` + } `json:"livenessProbe"` + } `json:"probes"` +} + +func (r *InstanceDetailResp) FromInstanceDetail(id *InstanceDetail) *InstanceDetailResp { + r.AppName = id.AppName.Values() + r.RpcPort = id.RpcPort.Values() + r.Ip = id.Ip.Values() + r.WorkloadName = id.WorkloadName.Values() + r.Labels = id.Labels.Values() + r.CreateTime = id.CreateTime.Values() + r.ReadyTime = id.ReadyTime.Values() + r.RegisterTime = id.RegisterTime.Values() + r.RegisterCluster = id.RegisterClusters.Values() + r.DeployCluster = id.DeployCluster.Values() + r.Node = id.Node.Values() + r.Image = id.Image.Values() + return r +} + +type InstanceDetail struct { + RpcPort Set + Ip Set + AppName Set + WorkloadName Set + Labels Set + CreateTime Set + ReadyTime Set + RegisterTime Set + RegisterClusters Set + DeployCluster Set + Node Set + Image Set +} Review Comment: I've updated both interface so that they pass the response validation of openAPI now. https://github.com/apache/dubbo-kubernetes/pull/286/commits/45772ab0747dd4058fee73d5aed0c1811943de73 https://github.com/apache/dubbo-kubernetes/pull/286/commits/3bfa281b8d5f864800486b4fca8e5f9c1d1b6257 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org