summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-09-23 13:32:58 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-09-23 15:39:25 +0200
commit376ba349bfadc47a938084ccb3c2d112c92f09ca (patch)
treefa8acd364392a28b0f0cddc361b83806b4da4458 /pkg/domain/infra/tunnel
parent5cedd830f7275e8dc3382502908b846bfa57a3b8 (diff)
downloadpodman-376ba349bfadc47a938084ccb3c2d112c92f09ca.tar.gz
podman-376ba349bfadc47a938084ccb3c2d112c92f09ca.tar.bz2
podman-376ba349bfadc47a938084ccb3c2d112c92f09ca.zip
stats refactor
Refactor the entities' stats API to simplify using it and reduce the risk of running into concurrency issues at the call sites. Further simplify the stats code by de-spaghetti-ing the logic and reducing duplicate code. `ContainerStats` now returns a data channel and an error. If the error is nil, callers can read from the channel. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/containers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index d0f90d900..60136faae 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -682,6 +682,6 @@ func (ic *ContainerEngine) ContainerCp(ctx context.Context, source, dest string,
func (ic *ContainerEngine) Shutdown(_ context.Context) {
}
-func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []string, options entities.ContainerStatsOptions) error {
- return errors.New("not implemented")
+func (ic *ContainerEngine) ContainerStats(ctx context.Context, namesOrIds []string, options entities.ContainerStatsOptions) (statsChan chan entities.ContainerStatsReport, err error) {
+ return nil, errors.New("not implemented")
}