diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-09-23 14:01:29 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-04 09:51:09 -0500 |
commit | 35361595f36728958e6abb2c37c22d79a776913a (patch) | |
tree | a844fb8eb6f8cf44b7619068599c6741c413f527 /libpod/volume.go | |
parent | d4b2f116018e1d8e6a3c4f80f30db45934428c6b (diff) | |
download | podman-35361595f36728958e6abb2c37c22d79a776913a.tar.gz podman-35361595f36728958e6abb2c37c22d79a776913a.tar.bz2 podman-35361595f36728958e6abb2c37c22d79a776913a.zip |
Remove runtime lockDir and add in-memory lock manager
Remove runtime's lockDir as it is no longer needed after the lock
rework.
Add a trivial in-memory lock manager for unit testing
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/volume.go')
-rw-r--r-- | libpod/volume.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libpod/volume.go b/libpod/volume.go index b732e8aa7..026a3bf49 100644 --- a/libpod/volume.go +++ b/libpod/volume.go @@ -1,6 +1,6 @@ package libpod -import "github.com/containers/storage" +import "github.com/containers/libpod/libpod/lock" // Volume is the type used to create named volumes // TODO: all volumes should be created using this and the Volume API @@ -9,13 +9,17 @@ type Volume struct { valid bool runtime *Runtime - lock storage.Locker + lock lock.Locker } // VolumeConfig holds the volume's config information //easyjson:json type VolumeConfig struct { - Name string `json:"name"` + // Name of the volume + Name string `json:"name"` + // ID of this volume's lock + LockID uint32 `json:"lockID"` + Labels map[string]string `json:"labels"` MountPoint string `json:"mountPoint"` Driver string `json:"driver"` |