summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index d54e90722..bc3a63940 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -309,3 +309,23 @@ func (r *Runtime) refresh(alivePath string) error {
return nil
}
+
+// Info returns the store and host information
+func (r *Runtime) Info() ([]InfoData, error) {
+ info := []InfoData{}
+ // get host information
+ hostInfo, err := r.hostInfo()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting host info")
+ }
+ info = append(info, InfoData{Type: "host", Data: hostInfo})
+
+ // get store information
+ storeInfo, err := r.storeInfo()
+ if err != nil {
+ return nil, errors.Wrapf(err, "error getting store info")
+ }
+ info = append(info, InfoData{Type: "store", Data: storeInfo})
+
+ return info, nil
+}