- Separate converted parameter rules from ParamFlowManager. Now the converted rules will be kept in GatewayRuleManager directly.
- Add a GatewayFlowSlot to do separate flow checking for generated rules.
- Refactor rule converting mechanism: now gateway rules in normal mode (without parameter) will also be converted to a parameter flow rule. The index will be the last (the last position). In GatewayParamParser we put a constant value to the last position.
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add a ParameterMetricStorage specific for caching ParameterMetric (moved from ParamSlot)
- Add rule map building helper method in ParamFlowRuleUtil so that we can reuse it in other rule managers
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Add Sentinel MetricExtension, which provides extension to Sentinel internal statistics.
This extension provides callbacks when a request passes rule checking,
blocked by flow control, successfully end or exception occurred.
Accompanied by these events, response time and current thread number
will be recorded too.
Signed-off-by: Carpenter Lee <hooleeucas@163.com>
- Now the adapter is based-on sentinel-api-gateway-adapter-common and supports both proxyId and customized APIs
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Refactor the semantics and logic for blockHandler and fallback
- Add `fallbackClass` support for fallback in global classes
- Add `defaultFallback` support
- Update test cases and demo
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- The `appType` can be retrieved from `csp.sentinel.app.type` field. It's useful to identify the service type (e.g. API gateway).
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
* support burst count, statistic interval per rule and throttling mode.
* Add fields in ParamFlowRule to support burst count, throttle, statistic interval per rule.
* Deprecate HotParamLeapArray and use token bucket algorithm directly.
- Add `AuthController` and `SimpleWebAuthServiceImpl`
- Update `AuthFilter`
- Add a simple login page and frontend interceptor to support auth check and session storage
* Restructure: SentinelApiClient to support posting and refine it to make it simple
* Enhancement: SentinelVersion parsing logic
* Bug fix: comparison bug of SentinelVersion