()
| 286 | } |
| 287 | |
| 288 | func (h *crioContainerHandler) getLibcontainerHandler() *containerlibcontainer.Handler { |
| 289 | if h.pidKnown { |
| 290 | return h.libcontainerHandler |
| 291 | } |
| 292 | |
| 293 | id := ContainerNameToCrioId(h.name) |
| 294 | |
| 295 | cInfo, err := h.client.ContainerInfo(id) |
| 296 | if err != nil || cInfo.Pid == 0 { |
| 297 | return h.libcontainerHandler |
| 298 | } |
| 299 | |
| 300 | h.pidKnown = true |
| 301 | h.libcontainerHandler = containerlibcontainer.NewHandler(h.cgroupManager, h.rootFs, cInfo.Pid, h.includedMetrics) |
| 302 | |
| 303 | return h.libcontainerHandler |
| 304 | } |
| 305 | |
| 306 | func (h *crioContainerHandler) GetStats() (*info.ContainerStats, error) { |
| 307 | libcontainerHandler := h.getLibcontainerHandler() |
no test coverage detected