Versions in this module Expand all Collapse all v0 v0.0.4 Sep 14, 2020 Changes in this version + func ClearRules() error + func CurrentCpuUsage() float64 + func CurrentLoad() float64 + func InitCollector(intervalMs uint32) + func IsValidSystemRule(rule *Rule) error + func LoadRules(rules []*Rule) (bool, error) + type AdaptiveSlot struct + func (s *AdaptiveSlot) Check(ctx *base.EntryContext) *base.TokenResult + type AdaptiveStrategy int32 + const BBR + const NoAdaptive + func (t AdaptiveStrategy) String() string + type MetricType uint32 + const AvgRT + const Concurrency + const CpuUsage + const InboundQPS + const Load + const MetricTypeSize + func (t MetricType) String() string + type Rule struct + ID uint64 + MetricType MetricType + Strategy AdaptiveStrategy + TriggerCount float64 + func GetRules() []*Rule + func (r *Rule) ResourceName() string + func (r *Rule) String() string + type RuleMap map[MetricType][]*Rule