()
| 304 | } |
| 305 | |
| 306 | func (h *crioContainerHandler) GetStats() (*info.ContainerStats, error) { |
| 307 | libcontainerHandler := h.getLibcontainerHandler() |
| 308 | stats, err := libcontainerHandler.GetStats() |
| 309 | if err != nil { |
| 310 | return stats, err |
| 311 | } |
| 312 | |
| 313 | if h.includedMetrics.Has(container.NetworkUsageMetrics) && (stats.Network == nil || len(stats.Network.Interfaces) == 0) { |
| 314 | // No network related information indicates that the pid of the |
| 315 | // container is not longer valid and we need to ask crio to |
| 316 | // provide the pid of another container from that pod |
| 317 | h.pidKnown = false |
| 318 | return stats, nil |
| 319 | } |
| 320 | // Get filesystem stats. |
| 321 | err = h.getFsStats(stats) |
| 322 | if err != nil { |
| 323 | return stats, err |
| 324 | } |
| 325 | |
| 326 | return stats, nil |
| 327 | } |
| 328 | |
| 329 | func (h *crioContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { |
| 330 | // No-op for Docker driver. |
nothing calls this directly
no test coverage detected