package
0.0.4
Repository: https://github.com/louyuting/sentinel-golang.git
Documentation: pkg.go.dev

# Functions

ClearRules clears all the rules in flow module.
GetResRules returns specific resource's rules based on copy.
GetRules returns all the 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.
No description provided by the author
No description provided by the author
No description provided by the author
NewTrafficShapingController creates a TrafficShapingController wrapped with the given checker and flow rule.
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.
Concurrency represents concurrency count.
CurrentResource means flow control by current resource directly.
No description provided by the author
QPS represents request count per second.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
Rule describes the strategy of flow control.
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

No description provided by the author
MetricType represents the target metric type.
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.