Documentation ¶
Index ¶
Constants ¶
View Source
const ( RunModeControl = "CONTROL" RunModeMonitor = "MONITOR" )
RunMode
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonRuleConfig ¶
type CommonRuleConfig struct {
RuleConfigs []RuleConfig `json:"rule_configs"`
}
CommonRuleConfig config
type ComparisonCofig ¶
type ComparisonCofig struct { CompareType string `json:"compare_type"` Key string `json:"key"` Value string `json:"value"` }
ComparisonCofig config
type LimitConfig ¶
type LimitConfig struct { LimitStrategy string `json:"limit_strategy"` MaxBurstRatio float64 `json:"max_burst_ratio"` PeriodMs int `json:"period_ms"` MaxAllows int `json:"max_allows"` }
LimitConfig config
type ResourceConfig ¶
type ResourceConfig struct { Headers []ComparisonCofig `json:"headers"` HeadersRelation string `json:"headers_relation"` Params []ComparisonCofig `json:"params"` ParamsRelation string `json:"params_relation"` }
ResourceConfig config
type RuleConfig ¶
type RuleConfig struct { Id int `json:"id"` Index int `json:"index"` Name string `json:"name"` AppName string `json:"appName"` Enable bool `json:"enable"` RunMode string `json:"run_mode"` LimitConfig LimitConfig `json:"limit"` ResourceConfigs []ResourceConfig `json:"resources"` }
RuleConfig config
Click to show internal directories.
Click to hide internal directories.