model

package
v0.0.0-...-cb950d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL