# Functions

ClearRules clears all the rules in flow module.
ClearRulesOfResource clears resource level rules in flow module.
GetRules returns all the rules based on copy.
GetRulesOfResource returns specific resource's rules based on copy.
IsValidRule checks whether the given Rule is valid.
LoadRules loads the given flow rules to the rule manager, while all previous rules will be replaced.
LoadRulesOfResource loads the given resource's flow rules to the rule manager, while all previous resource's rules will be replaced.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SetTrafficShapingGenerator sets the traffic controller generator for the given TokenCalculateStrategy and ControlBehavior.

# Constants

AssociatedResource means flow control by the associated resource rather than current resource.
No description provided by the author
CurrentResource means flow control by current resource directly.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Throttling indicates that pending requests will be throttled, wait in queue (until free capacity is available).
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

No description provided by the author
MemoryAdaptiveTrafficShapingCalculator is a memory adaptive traffic shaping calculator adaptive flow control algorithm If the watermark is less than Rule.MemLowWaterMarkBytes, the threshold is Rule.LowMemUsageThreshold.
No description provided by the author
Rule describes the strategy of flow control, the flow control strategy is based on QPS statistic metric.
No description provided by the author
No description provided by the author
ThrottlingChecker limits the time interval between two requests.
No description provided by the author
No description provided by the author

# Interfaces

TrafficShapingCalculator calculates the actual traffic shaping threshold based on the threshold of rule and the traffic shaping strategy.
TrafficShapingChecker performs checking according to current metrics and the traffic shaping strategy, then yield the token result.

# Type aliases

ControlBehavior defines the behavior when requests have reached the capacity of the resource.
RelationStrategy indicates the flow control strategy based on the relation of invocations.
No description provided by the author
TrafficControllerGenFunc represents the TrafficShapingController generator function of a specific control behavior.
TrafficControllerMap represents the map storage for TrafficShapingController.