1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/cli/command
Boaz Shuster 929a77b814 Hide the mutex in formatter.ContainerStats
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>
2016-10-10 21:52:53 +03:00
..
bundlefile Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
checkpoint Make all the experimental subcommand consistent. 2016-09-19 16:27:23 -04:00
commands Merge pull request #26716 from dnephin/move-system-commands 2016-09-20 15:54:01 +02:00
container Hide the mutex in formatter.ContainerStats 2016-10-10 21:52:53 +03:00
formatter Hide the mutex in formatter.ContainerStats 2016-10-10 21:52:53 +03:00
idresolver Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
image Only hide commands if the env variable is set. 2016-09-19 13:28:15 -04:00
inspect Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
network Only hide commands if the env variable is set. 2016-09-19 13:28:15 -04:00
node Only hide commands if the env variable is set. 2016-09-19 13:28:15 -04:00
plugin Make all the experimental subcommand consistent. 2016-09-19 16:27:23 -04:00
registry Move the search command to the registry package. 2016-09-19 13:28:15 -04:00
service Merge pull request #25025 from cpuguy83/service_inspect_formatter 2016-09-20 14:49:45 +02:00
stack Make all the experimental subcommand consistent. 2016-09-19 16:27:23 -04:00
swarm Clarify usage of --force when used on a swarm manager 2016-09-21 13:05:33 -07:00
system Create a system subcommand for events and info. 2016-09-19 16:29:17 -04:00
task Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
volume Only hide commands if the env variable is set. 2016-09-19 13:28:15 -04:00
cli.go Remove RetrieveAuthConfigs 2016-09-09 15:50:01 -04:00
in.go Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
out.go Windows: OCI process struct convergence 2016-09-19 10:34:31 -07:00
registry.go Remove remaining registry methods from DockerCLI. 2016-09-09 15:50:01 -04:00
trust.go Move image trust related cli methods into the image package. 2016-09-09 10:50:16 -04:00
utils.go Move api/client -> cli/command 2016-09-08 15:46:29 -04:00