mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 00:31:02 -04:00
843aebf2c1
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
23 lines
520 B
Go
23 lines
520 B
Go
package blkiodev // import "github.com/docker/docker/api/types/blkiodev"
|
|
|
|
import "fmt"
|
|
|
|
// WeightDevice is a structure that holds device:weight pair
|
|
type WeightDevice struct {
|
|
Path string
|
|
Weight uint16
|
|
}
|
|
|
|
func (w *WeightDevice) String() string {
|
|
return fmt.Sprintf("%s:%d", w.Path, w.Weight)
|
|
}
|
|
|
|
// ThrottleDevice is a structure that holds device:rate_per_second pair
|
|
type ThrottleDevice struct {
|
|
Path string
|
|
Rate uint64
|
|
}
|
|
|
|
func (t *ThrottleDevice) String() string {
|
|
return fmt.Sprintf("%s:%d", t.Path, t.Rate)
|
|
}
|