瀏覽代碼

Add DeviceSet interface

This interface matches the device-mapper implementation (DeviceSetDM)
but is free from any dependencies. This allows core docker code
to refer to a DeviceSet without having an explicit dependency on
the devmapper package.

This is important, because the devmapper package has external
dependencies which are not wanted in the docker client app, as it
needs to run with minimal dependencies in the docker image.
Alexander Larsson 12 年之前
父節點
當前提交
ac194fc696
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      deviceset.go

+ 11 - 0
deviceset.go

@@ -0,0 +1,11 @@
+package docker
+
+type DeviceSet interface {
+	AddDevice(hash, baseHash string) error
+	SetInitialized(hash string) error
+	DeactivateDevice(hash string) error
+	RemoveDevice(hash string) error
+	MountDevice(hash, path string) error
+	HasDevice(hash string) bool
+	HasInitializedDevice(hash string) bool
+}