summaryrefslogtreecommitdiff
path: root/libpod/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/state.go')
-rw-r--r--libpod/state.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go
index 6206a2994..44632b02f 100644
--- a/libpod/state.go
+++ b/libpod/state.go
@@ -43,6 +43,12 @@ type State interface {
// containers and pods in all namespaces will be returned.
SetNamespace(ns string) error
+ // Resolve an ID into a Name. Since Podman names and IDs are globally
+ // unique between Pods and Containers, the ID may belong to either a pod
+ // or container. Despite this, we will always return ErrNoSuchCtr if the
+ // ID does not exist.
+ GetName(id string) (string, error)
+
// Return a container from the database from its full ID.
// If the container is not in the set namespace, an error will be
// returned.