GetDeployingProgress 추가

This commit is contained in:
2023-10-24 21:18:28 +09:00
parent b8c1e97ab8
commit 2985e0fdaf
4 changed files with 12 additions and 17 deletions

View File

@ -517,3 +517,7 @@ func (h *houstonHandler) GetLogFileLinks(w http.ResponseWriter, r *http.Request)
enc := json.NewEncoder(w)
enc.Encode(out)
}
func (h *houstonHandler) GetDeployingProgress(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(h.Operation().DeplyingProgress())
}

View File

@ -418,6 +418,10 @@ func (os *operationServer) Hosts() map[string]hostSnapshot {
return os.hp.allHosts()
}
func (os *operationServer) DeplyingProgress() []*protos.DeployingProgress {
return os.db.clone()
}
func newOperationServer() *operationServer {
return &operationServer{
hp: hostPool{

View File

@ -108,6 +108,7 @@ type Operation interface {
RestartProcess(RestartProcessRequest)
Upload(UploadRequest)
Hosts() map[string]hostSnapshot
DeplyingProgress() []*protos.DeployingProgress
}
func loadServerConfig() serverConfig {