MCPcopy Create free account
hub / github.com/cloudfoundry/garden / Lookup

Method Lookup

client/client.go:67–80  ·  view source on GitHub ↗
(handle string)

Source from the content-addressed store, hash-verified

65}
66
67func (client *client) Lookup(handle string) (garden.Container, error) {
68 handles, err := client.connection.List(nil)
69 if err != nil {
70 return nil, err
71 }
72
73 for _, h := range handles {
74 if h == handle {
75 return newContainer(handle, client.connection), nil
76 }
77 }
78
79 return nil, garden.ContainerNotFoundError{Handle: handle}
80}

Callers

nothing calls this directly

Calls 2

newContainerFunction · 0.85
ListMethod · 0.65

Tested by

no test coverage detected