MCPcopy
hub / github.com/dgraph-io/dgraph / GetContainer

Method GetContainer

testutil/docker.go:163–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161}
162
163func (in ContainerInstance) GetContainer() *container.Summary {
164 containers := AllContainers(in.Prefix)
165
166 q := fmt.Sprintf("/%s_%s_", in.Prefix, in.Name)
167 for _, c := range containers {
168 for _, name := range c.Names {
169 if strings.HasPrefix(name, q) {
170 return &c
171 }
172 }
173 }
174 return nil
175}
176
177func getContainer(name string) container.Summary {
178 cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())

Callers 3

publicPortMethod · 0.95
TestZeroGracefulShutdownFunction · 0.80
DetectIfRaceViolationFunction · 0.80

Calls 1

AllContainersFunction · 0.85

Tested by 1

TestZeroGracefulShutdownFunction · 0.64