dockerclient icon indicating copy to clipboard operation
dockerclient copied to clipboard

Add a blocking get stats interface

Open pmorton opened this issue 10 years ago • 2 comments

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.

  1. When an error occurs that causes the go routine to exit, I need to know the error and the container ID that it is related to.
  2. I need to be able to ask a specific stats monitor (go routine) to stop politely
  3. I would prefer to use channels over callbacks for `stat`` processing.

Thoughts?

pmorton avatar Mar 28 '15 14:03 pmorton

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.

ehazlett avatar Mar 30 '15 17:03 ehazlett

@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

donhcd avatar Apr 06 '15 20:04 donhcd