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

Function findDdevSSHAuth

pkg/ddevapp/ssh_auth.go:189–200  ·  view source on GitHub ↗

findDdevSSHAuth uses FindContainerByLabels to get our sshAuth container and return it (or nil if it doesn't exist yet)

()

Source from the content-addressed store, hash-verified

187// findDdevSSHAuth uses FindContainerByLabels to get our sshAuth container and
188// return it (or nil if it doesn't exist yet)
189func findDdevSSHAuth() (*container.Summary, error) {
190 containerQuery := map[string]string{
191 "com.docker.compose.project": SSHAuthName,
192 "com.docker.compose.oneoff": "False",
193 }
194
195 c, err := dockerutil.FindContainerByLabels(containerQuery)
196 if err != nil {
197 return nil, fmt.Errorf("failed to execute findContainersByLabels, %v", err)
198 }
199 return c, nil
200}
201
202// RenderSSHAuthStatus returns a user-friendly string showing sshAuth-status
203func RenderSSHAuthStatus() string {

Callers 1

Calls 2

FindContainerByLabelsFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected