package
0.0.0-20200226065818-fe632b36a108
Repository: https://github.com/alipay/sofa-mesh.git
Documentation: pkg.go.dev
# Functions
DefaultOptions returns a new set of options, initialized to the defaults.
NewGRPCLatencyEvaluator creates a new LoadEvaluator that uses an average of gRPC Response Latency.
NewRateLimitEvaluator builds a new RateLimitEvaluator.
NewThrottler builds a Throttler based on the configured options.
ThresholdExceeded determines if a load evaluation status is `ExceedsThreshold`.
# Constants
BelowThreshold indicates that a given request will not exceed a threshold.
Impact of each sample is expected to last ~2s.
DefaultSampleFrequency controls the base sampling rate of latency averaging calculation.
Disabled removes all throttling behavior for the server.
Enforce turns the throttling behavior on for the server.
ExceedsThreshold indicates that a given request will exceed a threshold.
GRPCLatencyEvaluatorName is the name of the gRPC Response Latency LoadEvaluator.
LogOnly enables an advisory mode for throttling behavior on the server.
RateLimitEvaluatorName is the canonical name of the RateLimitEvaluator.
# Structs
GRPCLatencyEvaluator calculates the moving average of response latency (as reported via the gRPC stats.Handler interface).
LoadEvaluation holds the result of the evaluation of a current request against a threshold.
Options define the set of configuration parameters for controlling loadshedding behavior.
RateLimitEvaluator enforces a configured rate limit, using a rate.Limiter.
No description provided by the author
No description provided by the author
# Interfaces
LoadEvaluator evaluates the current request against a threshold.
# Type aliases
LoadStatus records the determination of a LoadEvaluation.
No description provided by the author