github.com/sams1990/dockerrepo@v17.12.1-ce-rc2+incompatible/api/types/blkiodev/blkio.go (about) 1 package blkiodev 2 3 import "fmt" 4 5 // WeightDevice is a structure that holds device:weight pair 6 type WeightDevice struct { 7 Path string 8 Weight uint16 9 } 10 11 func (w *WeightDevice) String() string { 12 return fmt.Sprintf("%s:%d", w.Path, w.Weight) 13 } 14 15 // ThrottleDevice is a structure that holds device:rate_per_second pair 16 type ThrottleDevice struct { 17 Path string 18 Rate uint64 19 } 20 21 func (t *ThrottleDevice) String() string { 22 return fmt.Sprintf("%s:%d", t.Path, t.Rate) 23 }