diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-09-24 14:28:10 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-09-24 14:28:10 +0200 |
commit | 19b955f0999f7fe9e187e94d60327e4d6ee891c0 (patch) | |
tree | 98978a07b57f1b4d4290fd9c4c44a64f7acc41a6 /pkg/domain/entities | |
parent | 762b787fbf741eec0e59d81aaebbfc467351ceaa (diff) | |
download | podman-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/domain/entities')
-rw-r--r-- | pkg/domain/entities/containers.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index b6f86785f..7b272f01e 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -411,15 +411,17 @@ type ContainerCpReport struct { // ContainerStatsOptions describes input options for getting // stats on containers type ContainerStatsOptions struct { - All bool - Format string - Latest bool - NoReset bool - NoStream bool + // Operate on the latest known container. Only supported for local + // clients. + Latest bool + // Stream stats. + Stream bool } // ContainerStatsReport is used for streaming container stats. type ContainerStatsReport struct { + // Error from reading stats. Error error + // Results, set when there is no error. Stats []define.ContainerStats } |