summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2021-07-08 14:22:33 -0400
committerMatthew Heon <mheon@redhat.com>2021-07-08 14:22:33 -0400
commite5fcffc551b42936c635d13658e7d0a9e95d3a16 (patch)
tree613f87f31de469eea788e40f2e1b22a90aa3a8e8 /libpod/runtime.go
parent31c3b952e5da7eb11a32464a0cd74856265efec5 (diff)
downloadpodman-e5fcffc551b42936c635d13658e7d0a9e95d3a16.tar.gz
podman-e5fcffc551b42936c635d13658e7d0a9e95d3a16.tar.bz2
podman-e5fcffc551b42936c635d13658e7d0a9e95d3a16.zip
Remove GetStore function from Libpod
We should not be exposing the store outside of Libpod. We want to encapsulate it as an internal implementation detail - there's no reason functions outside of Libpod should directly be manipulating container storage. Convert the last use to invoke a method on Libpod instead, and remove the function. [NO TESTS NEEDED] as this is just a refactor. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d31d00ae4..30659a3d4 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -946,9 +946,12 @@ func (r *Runtime) StorageConfig() storage.StoreOptions {
return r.storageConfig
}
-// GetStore returns the runtime stores
-func (r *Runtime) GetStore() storage.Store {
- return r.store
+// RunRoot retrieves the current c/storage temporary directory in use by Libpod.
+func (r *Runtime) RunRoot() string {
+ if r.store == nil {
+ return ""
+ }
+ return r.store.RunRoot()
}
// GetName retrieves the name associated with a given full ID.