MCPcopy
hub / github.com/docker/compose / downDirectionTraversal

Function downDirectionTraversal

pkg/compose/dependencies.go:67–76  ·  view source on GitHub ↗
(visitorFn func(context.Context, string) error)

Source from the content-addressed store, hash-verified

65}
66
67func downDirectionTraversal(visitorFn func(context.Context, string) error) *graphTraversal {
68 return &graphTraversal{
69 extremityNodesFn: (*Graph).Roots,
70 adjacentNodesFn: (*Vertex).GetChildren,
71 filterAdjacentByStatusFn: (*Graph).FilterParents,
72 adjacentServiceStatusToSkip: ServiceStarted,
73 targetServiceStatus: ServiceStopped,
74 visitorFn: visitorFn,
75 }
76}
77
78// InDependencyOrder applies the function to the services of the project taking in account the dependency order
79func InDependencyOrder(ctx context.Context, project *types.Project, fn func(context.Context, string) error, options ...func(*graphTraversal)) error {

Callers 2

TestWith_RootNodesAndUpFunction · 0.85
InReverseDependencyOrderFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWith_RootNodesAndUpFunction · 0.68