Signed-off-by: David Calavera <david.calavera@gmail.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,23 @@ |
| 0 |
+package blkiodev |
|
| 1 |
+ |
|
| 2 |
+import "fmt" |
|
| 3 |
+ |
|
| 4 |
+// WeightDevice is a structure that hold device:weight pair |
|
| 5 |
+type WeightDevice struct {
|
|
| 6 |
+ Path string |
|
| 7 |
+ Weight uint16 |
|
| 8 |
+} |
|
| 9 |
+ |
|
| 10 |
+func (w *WeightDevice) String() string {
|
|
| 11 |
+ return fmt.Sprintf("%s:%d", w.Path, w.Weight)
|
|
| 12 |
+} |
|
| 13 |
+ |
|
| 14 |
+// ThrottleDevice is a structure that hold device:rate_per_second pair |
|
| 15 |
+type ThrottleDevice struct {
|
|
| 16 |
+ Path string |
|
| 17 |
+ Rate uint64 |
|
| 18 |
+} |
|
| 19 |
+ |
|
| 20 |
+func (t *ThrottleDevice) String() string {
|
|
| 21 |
+ return fmt.Sprintf("%s:%d", t.Path, t.Rate)
|
|
| 22 |
+} |
| 0 | 23 |
old mode 100755 |
| 1 | 24 |
new mode 100644 |
| ... | ... |
@@ -12,12 +12,12 @@ import ( |
| 12 | 12 |
"syscall" |
| 13 | 13 |
|
| 14 | 14 |
"github.com/Sirupsen/logrus" |
| 15 |
+ pblkiodev "github.com/docker/docker/api/types/blkiodev" |
|
| 15 | 16 |
"github.com/docker/docker/container" |
| 16 | 17 |
"github.com/docker/docker/daemon/graphdriver" |
| 17 | 18 |
derr "github.com/docker/docker/errors" |
| 18 | 19 |
"github.com/docker/docker/image" |
| 19 | 20 |
"github.com/docker/docker/layer" |
| 20 |
- pblkiodev "github.com/docker/docker/pkg/blkiodev" |
|
| 21 | 21 |
"github.com/docker/docker/pkg/idtools" |
| 22 | 22 |
"github.com/docker/docker/pkg/parsers/kernel" |
| 23 | 23 |
"github.com/docker/docker/pkg/sysinfo" |
| 10 | 10 |
deleted file mode 100644 |
| ... | ... |
@@ -1,25 +0,0 @@ |
| 1 |
-package blkiodev |
|
| 2 |
- |
|
| 3 |
-import ( |
|
| 4 |
- "fmt" |
|
| 5 |
-) |
|
| 6 |
- |
|
| 7 |
-// WeightDevice is a structure that hold device:weight pair |
|
| 8 |
-type WeightDevice struct {
|
|
| 9 |
- Path string |
|
| 10 |
- Weight uint16 |
|
| 11 |
-} |
|
| 12 |
- |
|
| 13 |
-func (w *WeightDevice) String() string {
|
|
| 14 |
- return fmt.Sprintf("%s:%d", w.Path, w.Weight)
|
|
| 15 |
-} |
|
| 16 |
- |
|
| 17 |
-// ThrottleDevice is a structure that hold device:rate_per_second pair |
|
| 18 |
-type ThrottleDevice struct {
|
|
| 19 |
- Path string |
|
| 20 |
- Rate uint64 |
|
| 21 |
-} |
|
| 22 |
- |
|
| 23 |
-func (t *ThrottleDevice) String() string {
|
|
| 24 |
- return fmt.Sprintf("%s:%d", t.Path, t.Rate)
|
|
| 25 |
-} |