mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
929a77b814
The formatter.ContainerStats struct exposes its Mutex. This is a bad design and should be fixed. To fix that, I separated the statistics attributes from ContainerStats to StatsEntry and hid the mutex. Notice that the mutex protects both the `err` field and the statistics attributes. Then, implemented SetStatistics, SetError, GetStatistics and GetError to avoid races. Moreover, to make this less granular, I decided to replace the read-write mutex with the regular mutex and to pass a StatsEntry slice to formatter.ContainerStatsWrite Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com> |
||
---|---|---|
.. | ||
container.go | ||
container_test.go | ||
custom.go | ||
custom_test.go | ||
formatter.go | ||
image.go | ||
image_test.go | ||
network.go | ||
network_test.go | ||
service.go | ||
stats.go | ||
volume.go | ||
volume_test.go |