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

Method FindContainerByType

pkg/ddevapp/ddevapp.go:207–215  ·  view source on GitHub ↗

FindContainerByType will find a container for this site denoted by the containerType if it is available.

(containerType string)

Source from the content-addressed store, hash-verified

205
206// FindContainerByType will find a container for this site denoted by the containerType if it is available.
207func (app *DdevApp) FindContainerByType(containerType string) (*container.Summary, error) {
208 labels := map[string]string{
209 "com.ddev.site-name": app.GetName(),
210 "com.docker.compose.service": containerType,
211 "com.docker.compose.oneoff": "False",
212 }
213
214 return dockerutil.FindContainerByLabels(labels)
215}
216
217// Describe returns a map which provides detailed information on services associated with the running site.
218// if short==true, then only the basic information is returned.

Callers 12

InitMethod · 0.95
SiteStatusMethod · 0.95
LogsMethod · 0.95
CaptureLogsMethod · 0.95
TestGetAllURLsFunction · 0.80
constructContainerNameFunction · 0.80
GetServiceNamesFuncFunction · 0.80
exec.goFile · 0.80

Calls 2

GetNameMethod · 0.95
FindContainerByLabelsFunction · 0.92

Tested by 3

TestGetAllURLsFunction · 0.64
constructContainerNameFunction · 0.64