summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod/containers_stats.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-09-24 14:28:10 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-09-24 14:28:10 +0200
commit19b955f0999f7fe9e187e94d60327e4d6ee891c0 (patch)
tree98978a07b57f1b4d4290fd9c4c44a64f7acc41a6 /pkg/api/handlers/libpod/containers_stats.go
parent762b787fbf741eec0e59d81aaebbfc467351ceaa (diff)
downloadpodman-19b955f0999f7fe9e187e94d60327e4d6ee891c0.tar.gz
podman-19b955f0999f7fe9e187e94d60327e4d6ee891c0.tar.bz2
podman-19b955f0999f7fe9e187e94d60327e4d6ee891c0.zip
stats: break out CLI options
Have a clear separation of concerns for the CLI-only options (and their logic) from the backend. The backend logic is now easier to understand (e.g., `stream` instead of `noStream`). Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/containers_stats.go')
-rw-r--r--pkg/api/handlers/libpod/containers_stats.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/containers_stats.go b/pkg/api/handlers/libpod/containers_stats.go
index 3066d5ebc..4d5abe118 100644
--- a/pkg/api/handlers/libpod/containers_stats.go
+++ b/pkg/api/handlers/libpod/containers_stats.go
@@ -36,8 +36,7 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) {
containerEngine := abi.ContainerEngine{Libpod: runtime}
statsOptions := entities.ContainerStatsOptions{
- All: len(query.Containers) == 0, // no containers -> query all of them
- NoStream: !query.Stream,
+ Stream: query.Stream,
}
// Stats will stop if the connection is closed.