(ctx context.Context, project string, oneOff oneOff, all bool, selectedServices ...string)
| 43 | ) |
| 44 | |
| 45 | func (s *composeService) getContainers(ctx context.Context, project string, oneOff oneOff, all bool, selectedServices ...string) (Containers, error) { |
| 46 | res, err := s.apiClient().ContainerList(ctx, client.ContainerListOptions{ |
| 47 | Filters: getDefaultFilters(project, oneOff, selectedServices...), |
| 48 | All: all, |
| 49 | }) |
| 50 | if err != nil { |
| 51 | return nil, err |
| 52 | } |
| 53 | containers := Containers(res.Items) |
| 54 | if len(selectedServices) > 1 { |
| 55 | containers = containers.filter(isService(selectedServices...)) |
| 56 | } |
| 57 | return containers, nil |
| 58 | } |
| 59 | |
| 60 | // getContainersByService returns all non-oneoff containers for the project, grouped by service name. |
| 61 | func (s *composeService) getContainersByService(ctx context.Context, projectName string) (map[string]Containers, error) { |
no test coverage detected