(name string, cgroupPaths map[string]string, listType container.ListType)
| 350 | } |
| 351 | |
| 352 | func ListContainers(name string, cgroupPaths map[string]string, listType container.ListType) ([]info.ContainerReference, error) { |
| 353 | containers := make(map[string]struct{}) |
| 354 | for _, cgroupPath := range cgroupPaths { |
| 355 | err := ListDirectories(cgroupPath, name, listType == container.ListRecursive, containers) |
| 356 | if err != nil { |
| 357 | return nil, err |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | // Make into container references. |
| 362 | ret := make([]info.ContainerReference, 0, len(containers)) |
| 363 | for cont := range containers { |
| 364 | ret = append(ret, info.ContainerReference{ |
| 365 | Name: cont, |
| 366 | }) |
| 367 | } |
| 368 | |
| 369 | return ret, nil |
| 370 | } |
| 371 | |
| 372 | // AssignDeviceNamesToDiskStats assigns the Device field on the provided DiskIoStats by looking up |
| 373 | // the device major and minor identifiers in the provided device namer. |
no test coverage detected
searching dependent graphs…