-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I'm using 1.3.1-SNAPSHOT, which introduces StatsCmd.
Could you please explain why the API for that command is async (or to be more specific - why is it derived from EventsCmdApi)?
I've seen another pull request, by another guy - #227 and it's implemented in a synchronous way.
It makes more sense to me - I've already tried merged version and no matter what, I'm only getting one statistics event.
In such a case, all those callback methods like onCompletion, isReceiving are useless and the whole callback way only complicates the usage.
So, am I missing something? Could you please elaborate?
Oh, btw, here's the code snippet
https://gist.github.com/slnowak/a9e26daaa566310b1cd4
onStats method executes exacly once, onCompletion executes always with 1.
As far as I know, to check statistics, you only need to perform GET on /containers/id/stats and it returns json result. How does it differ from, for example, performing GET on /contaiers and why there is a need for async here?