MCPcopy Index your code
hub / github.com/ddev/ddev / determineStatus

Method determineStatus

pkg/ddevapp/ddevapp.go:1240–1254  ·  view source on GitHub ↗

Return one of the Site* statuses to describe the overall status of the project

(statuses map[string]string)

Source from the content-addressed store, hash-verified

1238
1239// Return one of the Site* statuses to describe the overall status of the project
1240func (app *DdevApp) determineStatus(statuses map[string]string) string {
1241 hasCommonStatus, commonStatus := app.getCommonStatus(statuses)
1242
1243 if hasCommonStatus {
1244 return commonStatus
1245 }
1246
1247 for status := range statuses {
1248 if status == SiteStarting {
1249 return SiteStarting
1250 }
1251 }
1252
1253 return SiteUnhealthy
1254}
1255
1256// Check whether a common status applies to all services
1257func (app *DdevApp) getCommonStatus(statuses map[string]string) (bool, string) {

Callers 1

SiteStatusMethod · 0.95

Calls 1

getCommonStatusMethod · 0.95

Tested by

no test coverage detected