Documentation ¶
Index ¶
Constants ¶
View Source
const (
Kind = constant.HTTPRateLimitFilter
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Resources []*pkgs.Resource `json:"resources,omitempty" yaml:"resources,omitempty"` Rules []*Rule `json:"rules,omitempty" yaml:"rules,omitempty"` LogPath string `json:"logPath,omitempty" yaml:"logPath,omitempty"` }
Config rate limit config
func GetMockedRateLimitConfig ¶
func GetMockedRateLimitConfig() *Config
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is http filter instance
func (*Filter) Decode ¶
func (f *Filter) Decode(hc *contexthttp.HttpContext) filter.FilterStatus
type FilterFactory ¶
type FilterFactory struct {
// contains filtered or unexported fields
}
FilterFactory is http filter instance
func (*FilterFactory) Apply ¶
func (factory *FilterFactory) Apply() error
func (*FilterFactory) Config ¶
func (factory *FilterFactory) Config() interface{}
func (*FilterFactory) PrepareFilterChain ¶
func (factory *FilterFactory) PrepareFilterChain(ctx *contexthttp.HttpContext, chain filter.FilterChain) error
type Plugin ¶
type Plugin struct { }
Plugin is http filter plugin.
func (*Plugin) CreateFilterFactory ¶
func (p *Plugin) CreateFilterFactory() (filter.HttpFilterFactory, error)
Click to show internal directories.
Click to hide internal directories.