servicesUsingVolume returns the names of services that mount the given compose volume key, sorted for deterministic plan output. nolint:unused // see reconciler.prompt field doc — seam consolidation.
(volumeKey string)
| 340 | // |
| 341 | //nolint:unused // see reconciler.prompt field doc — seam consolidation. |
| 342 | func (r *reconciler) servicesUsingVolume(volumeKey string) []string { |
| 343 | var names []string |
| 344 | for _, key := range sortedKeys(r.project.Services) { |
| 345 | svc := r.project.Services[key] |
| 346 | for _, v := range svc.Volumes { |
| 347 | if v.Source == volumeKey { |
| 348 | names = append(names, svc.Name) |
| 349 | break |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | return names |
| 354 | } |
| 355 | |
| 356 | // containersForServices returns all observed containers belonging to the given |
| 357 | // service names. |
no test coverage detected