You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add containerStats API endpoint (since Remote API v1.17) #8
changed the title [-]Support Docker Remote API v1.17 (stats introduced with Docker v1.5)[/-][+]Add stats API endpoint (since Remote API v1.17)[/+]on Jun 17, 2015
This appears to be the only API endpoint that generates an endless stream of events.
As such, it makes little sense to add a Promise-based API for this endpoint, as Promises are all about the "results" of an operation.
One possible approach would be to inspect the stream and then resolve the promise when the first event is completed and then terminate the underlying stream.
Activity
clue commentedon Mar 16, 2015
This is a streaming API endpoint, so it depends on #4.
[-]Support Docker Remote API v1.17 (stats introduced with Docker v1.5)[/-][+]Add stats API endpoint (since Remote API v1.17)[/+]clue commentedon Jun 17, 2015
This appears to be the only API endpoint that generates an endless stream of events.
As such, it makes little sense to add a Promise-based API for this endpoint, as Promises are all about the "results" of an operation.
One possible approach would be to inspect the stream and then resolve the promise when the first event is completed and then terminate the underlying stream.
[-]Add stats API endpoint (since Remote API v1.17)[/-][+]Add containerStats API endpoint (since Remote API v1.17)[/+]clue commentedon Jun 20, 2015
The upcoming Remote API v1.19 will add a boolean
streamflag to indicate whether to terminate the stream after the first event. This is somewhat similar to the above approach.https://docs.docker.com/reference/api/docker_remote_api/#v1-19