(ctx context.Context, opts api.ListOptions)
| 31 | ) |
| 32 | |
| 33 | func (s *composeService) List(ctx context.Context, opts api.ListOptions) ([]api.Stack, error) { |
| 34 | list, err := s.apiClient().ContainerList(ctx, client.ContainerListOptions{ |
| 35 | Filters: make(client.Filters).Add("label", api.ProjectLabel).Add("label", api.ConfigHashLabel), |
| 36 | All: opts.All, |
| 37 | }) |
| 38 | if err != nil { |
| 39 | return nil, err |
| 40 | } |
| 41 | |
| 42 | return containersToStacks(list.Items) |
| 43 | } |
| 44 | |
| 45 | func containersToStacks(containers []container.Summary) ([]api.Stack, error) { |
| 46 | containersByLabel, keys, err := groupContainerByLabel(containers, api.ProjectLabel) |
nothing calls this directly
no test coverage detected