aboutsummaryrefslogtreecommitdiff
path: root/libpod/stats_unsupported.go
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-08-12 10:51:48 +0100
committerDoug Rabson <dfr@rabson.org>2022-08-17 11:45:07 +0100
commit1b88927c2cf1db7b6530748d67528b5209d93b42 (patch)
tree1007201debe0b3697a12092cd2a15f4a64a748fa /libpod/stats_unsupported.go
parentc90eec2700d2e00a4b8f1e06ca640c034af5a530 (diff)
downloadpodman-1b88927c2cf1db7b6530748d67528b5209d93b42.tar.gz
podman-1b88927c2cf1db7b6530748d67528b5209d93b42.tar.bz2
podman-1b88927c2cf1db7b6530748d67528b5209d93b42.zip
libpod: Add stubs for non-linux builds
Note: this makes info.go linux-only since it mixes linux-specific and generic code. This should be addressed in a separate refactoring PR. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
Diffstat (limited to 'libpod/stats_unsupported.go')
-rw-r--r--libpod/stats_unsupported.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/libpod/stats_unsupported.go b/libpod/stats_unsupported.go
new file mode 100644
index 000000000..b23333c2e
--- /dev/null
+++ b/libpod/stats_unsupported.go
@@ -0,0 +1,17 @@
+//go:build !linux
+// +build !linux
+
+package libpod
+
+import (
+ "errors"
+
+ "github.com/containers/podman/v4/libpod/define"
+)
+
+// GetContainerStats gets the running stats for a given container.
+// The previousStats is used to correctly calculate cpu percentages. You
+// should pass nil if there is no previous stat for this container.
+func (c *Container) GetContainerStats(previousStats *define.ContainerStats) (*define.ContainerStats, error) {
+ return nil, errors.New("not implemented (*Container) GetContainerStats")
+}