Change-Id: Ie642fff5cd1702cda00425628e11f3fd8c514798 Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
31 lines
459 B
Go
31 lines
459 B
Go
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
|
|
}
|