(visitorFn func(context.Context, string) error)
| 65 | } |
| 66 | |
| 67 | func 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 |
| 79 | func InDependencyOrder(ctx context.Context, project *types.Project, fn func(context.Context, string) error, options ...func(*graphTraversal)) error { |
no outgoing calls