Skip to content

Introduce boolean nostream parameter to StatsCmd #1278

Description

@alexey-atiskov

In order to use StatsCmd in not streaming style I would like to see parameter in StatsCmd that could help to execute request to Docker stats command with "stream=0" parameter.

This could be simply achieved by introducing methods

@CheckForNull
Boolean getNoStream();
StatsCmd withNoStream(Boolean noStream);

in StatsCmd.java

And adding

if (isTrue(command.getNoStream())) {
webTarget = webTarget.queryParam("stream", "0");
}

to both StatsCmdExec.java in com.github.dockerjava.jaxrs and com.github.dockerjava.core.exec packages.

This also can help to resolve
#971
#375

I can make a pull request for this if it is preferable=)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions