MCPcopy Create free account
hub / github.com/containers/common / getChildren

Method getChildren

libimage/image.go:244–253  ·  view source on GitHub ↗

getChildren returns a list of imageIDs that depend on the image. If all is false, only the first child image is returned. If tree is nil, it will be created for this invocation only.

(ctx context.Context, all bool, tree *layerTree)

Source from the content-addressed store, hash-verified

242// false, only the first child image is returned. If tree is nil, it will be
243// created for this invocation only.
244func (i *Image) getChildren(ctx context.Context, all bool, tree *layerTree) ([]*Image, error) {
245 if tree == nil {
246 t, err := i.runtime.layerTree()
247 if err != nil {
248 return nil, err
249 }
250 tree = t
251 }
252 return tree.children(ctx, i, all)
253}
254
255// Containers returns a list of containers using the image.
256func (i *Image) Containers() ([]string, error) {

Callers 4

isDanglingMethod · 0.95
isIntermediateMethod · 0.95
HasChildrenMethod · 0.95
ChildrenMethod · 0.95

Calls 2

layerTreeMethod · 0.80
childrenMethod · 0.80

Tested by

no test coverage detected