Skip to content

better provide a interface for linuxBlockIODevice #1067

@enzoyes

Description

@enzoyes

hi, when i try to modify linuxBlockIODevice outside package, it seems not convenient for its anonymous.
code slice is below.
What about provide a interface like GetlinuxBlockIODevice here or make it public?
If ok, i will provide a merge later.

// linuxBlockIODevice holds major:minor format supported in blkio cgroup
type linuxBlockIODevice struct {
// Major is the device's major number.
Major int64 json:"major"
// Minor is the device's minor number.
Minor int64 json:"minor"
}
// LinuxThrottleDevice struct holds a major:minor rate_per_second pair
type LinuxThrottleDevice struct {
linuxBlockIODevice
// Rate is the IO rate limit per cgroup per device
Rate uint64 json:"rate"
}

THX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions