add dockerManager / fix for Docker 24 and older

* dockerManager now handles all docker api interaction and container metrics tracking
* sets unlimited concurrency for docker 24 and older
This commit is contained in:
Henry Dollman
2024-10-02 19:45:26 -04:00
parent b9f142c28c
commit f051f6a5f8
3 changed files with 115 additions and 89 deletions

View File

@@ -2,13 +2,6 @@ package agent
import "math"
// delete container stats from map using mutex
func (a *Agent) deleteContainerStatsSync(id string) {
a.containerStatsMutex.Lock()
defer a.containerStatsMutex.Unlock()
delete(a.containerStatsMap, id)
}
func bytesToMegabytes(b float64) float64 {
return twoDecimals(b / 1048576)
}