MCPcopy Create free account
hub / github.com/docker/compose / Roots

Method Roots

pkg/compose/dependencies.go:350–361  ·  view source on GitHub ↗

Roots returns the slice of "Roots" of the graph

()

Source from the content-addressed store, hash-verified

348
349// Roots returns the slice of "Roots" of the graph
350func (g *Graph) Roots() []*Vertex {
351 g.lock.Lock()
352 defer g.lock.Unlock()
353
354 var res []*Vertex
355 for _, v := range g.Vertices {
356 if len(v.Parents) == 0 {
357 res = append(res, v)
358 }
359 }
360 return res
361}
362
363// UpdateStatus updates the status of a certain vertex
364func (g *Graph) UpdateStatus(key string, status ServiceStatus) {

Callers

nothing calls this directly

Calls 1

LockMethod · 0.45

Tested by

no test coverage detected