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

Function GetSSHAuthStatus

pkg/ddevapp/ssh_auth.go:220–236  ·  view source on GitHub ↗

GetSSHAuthStatus outputs sshAuth status and warning if not running or healthy, as applicable.

()

Source from the content-addressed store, hash-verified

218// GetSSHAuthStatus outputs sshAuth status and warning if not
219// running or healthy, as applicable.
220func GetSSHAuthStatus() string {
221 label := map[string]string{
222 "com.docker.compose.project": SSHAuthName,
223 "com.docker.compose.oneoff": "False",
224 }
225 c, err := dockerutil.FindContainerByLabels(label)
226
227 if err != nil {
228 util.Error("Failed to execute FindContainerByLabels(%v): %v", label, err)
229 return SiteStopped
230 }
231 if c == nil {
232 return SiteStopped
233 }
234 health, _ := dockerutil.GetContainerHealth(c)
235 return health
236}

Callers 2

RenderSSHAuthStatusFunction · 0.85
DescribeMethod · 0.85

Calls 3

FindContainerByLabelsFunction · 0.92
ErrorFunction · 0.92
GetContainerHealthFunction · 0.92

Tested by

no test coverage detected