Add a blocking get stats interface
Hi - I am working on an application that consumes the dockerclient api! (woot) Specifically I am working with the stats API. The implementation of the stats API in this library and great and seems well suited for short lived client application. I am writing a daemon that will monitor the stats and have some additional requirements that don't seem to work well with the current implementation.
- When an error occurs that causes the go routine to exit, I need to know the
errorand the container ID that it is related to. - I need to be able to ask a specific stats monitor (go routine) to stop politely
- I would prefer to use channels over callbacks for `stat`` processing.
Thoughts?
Yeah I'm not sure either. When I added the original implementation I was thinking along the lines of the event stream which handles things that way (callback).
+1 for stopping events for a single container.
@pmorton @ehazlett #71 handles the 3 requests that pmorton listed above - could you take a look at it? it has slightly more complex logic, but it's been tested and it works