forked from TrueCloudLab/frostfs-node
[#1700] config: Move config struct to qos package
Change-Id: Ie642fff5cd1702cda00425628e11f3fd8c514798 Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
3be33b7117
commit
5aaa3df533
9 changed files with 109 additions and 75 deletions
31
internal/qos/config.go
Normal file
31
internal/qos/config.go
Normal file
|
@ -0,0 +1,31 @@
|
|||
package qos
|
||||
|
||||
import (
|
||||
"math"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
NoLimit int64 = math.MaxInt64
|
||||
DefaultIdleTimeout = 5 * time.Minute
|
||||
)
|
||||
|
||||
type LimiterConfig struct {
|
||||
Read OpConfig
|
||||
Write OpConfig
|
||||
}
|
||||
|
||||
type OpConfig struct {
|
||||
MaxWaitingOps int64
|
||||
MaxRunningOps int64
|
||||
IdleTimeout time.Duration
|
||||
Tags []IOTagConfig
|
||||
}
|
||||
|
||||
type IOTagConfig struct {
|
||||
Tag string
|
||||
Weight *float64
|
||||
LimitOps *float64
|
||||
ReservedOps *float64
|
||||
Prohibited bool
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue