Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (*Config) RegisterFlags ¶ added in v0.7.0
RegisterFlags adds the flags required to configure this to the given FlagSet.
type EvictionConfig ¶
type EvictionConfig struct {
Threshold Threshold `yaml:"threshold"`
CheckInterval time.Duration `yaml:"check_interval"`
CooldownPeriod int `yaml:"cooldown_period"`
EvictionMetric string `yaml:"eviction_metric"`
MinQueryAge time.Duration `yaml:"min_query_age"`
MaxEvictionsPerCycle int `yaml:"max_evictions_per_cycle"`
}
EvictionConfig configures the resource-based query evictor.
func (EvictionConfig) Enabled ¶
func (c EvictionConfig) Enabled() bool
Enabled returns true when at least one eviction threshold is greater than 0.
type QueryProtection ¶ added in v1.20.0
type QueryProtection struct {
Rejection rejection `json:"rejection"`
Eviction EvictionConfig `yaml:"eviction"`
}
func (*QueryProtection) RegisterFlagsWithPrefix ¶ added in v1.20.0
func (cfg *QueryProtection) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix string)
func (*QueryProtection) Validate ¶ added in v1.20.0
func (cfg *QueryProtection) Validate(monitoredResources flagext.StringSliceCSV) error
type ResourceMonitor ¶ added in v1.20.0
type ResourceMonitor struct {
Resources flagext.StringSliceCSV `yaml:"resources"`
Interval time.Duration `yaml:"interval"`
CPURateInterval time.Duration `yaml:"cpu_rate_interval"`
}
func (*ResourceMonitor) RegisterFlags ¶ added in v1.20.0
func (cfg *ResourceMonitor) RegisterFlags(f *flag.FlagSet)
func (*ResourceMonitor) Validate ¶ added in v1.20.0
func (cfg *ResourceMonitor) Validate() error
Click to show internal directories.
Click to hide internal directories.