(nodeKey string)
| 192 | } |
| 193 | |
| 194 | func (t *graphTraversal) consume(nodeKey string) bool { |
| 195 | t.mu.Lock() |
| 196 | defer t.mu.Unlock() |
| 197 | if t.seen == nil { |
| 198 | t.seen = make(map[string]struct{}) |
| 199 | } |
| 200 | if _, ok := t.seen[nodeKey]; ok { |
| 201 | return false |
| 202 | } |
| 203 | t.seen[nodeKey] = struct{}{} |
| 204 | return true |
| 205 | } |
| 206 | |
| 207 | // Graph represents project as service dependencies |
| 208 | type Graph struct { |