blkio.go 520 B

1234567891011121314151617181920212223
  1. package blkiodev // import "github.com/docker/docker/api/types/blkiodev"
  2. import "fmt"
  3. // WeightDevice is a structure that holds device:weight pair
  4. type WeightDevice struct {
  5. Path string
  6. Weight uint16
  7. }
  8. func (w *WeightDevice) String() string {
  9. return fmt.Sprintf("%s:%d", w.Path, w.Weight)
  10. }
  11. // ThrottleDevice is a structure that holds device:rate_per_second pair
  12. type ThrottleDevice struct {
  13. Path string
  14. Rate uint64
  15. }
  16. func (t *ThrottleDevice) String() string {
  17. return fmt.Sprintf("%s:%d", t.Path, t.Rate)
  18. }