move driver and image metadata to libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
parent
a95bbe9608
commit
95e17b4a73
10 changed files with 81 additions and 903 deletions
24
libkpod/driver/driver.go
Normal file
24
libkpod/driver/driver.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package driver
|
||||
|
||||
import cstorage "github.com/containers/storage"
|
||||
|
||||
type DriverData struct {
|
||||
Name string
|
||||
Data map[string]string
|
||||
}
|
||||
|
||||
func GetDriverName(store cstorage.Store) (string, error) {
|
||||
driver, err := store.GraphDriver()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return driver.String(), nil
|
||||
}
|
||||
|
||||
func GetDriverMetadata(store cstorage.Store, layerID string) (map[string]string, error) {
|
||||
driver, err := store.GraphDriver()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return driver.Metadata(layerID)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue