Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/envoyproxy/ratelimit
/ functions
Functions
294 in github.com/envoyproxy/ratelimit
⨍
Functions
294
◇
Types & classes
79
↓ 79 callers
Method
EXPECT
()
test/mocks/redis/redis.go:62
↓ 71 callers
Method
EXPECT
()
test/mocks/redis/redis.go:101
↓ 39 callers
Method
PipeAppend
Append a command onto the pipeline queue. @param command supplies the command to append. @param args supplies the additional arguments.
src/redis/driver.go:26
↓ 37 callers
Method
PipeResponse
Execute the pipeline queue and wait for a response. @return a response object. Throws a RedisError if there was an error fetching the response.
src/redis/driver.go:31
↓ 29 callers
Method
Get
Get a connection from the pool. Call Put() on the connection when done. Throws RedisError if a connection can not be obtained.
src/redis/driver.go:14
↓ 26 callers
Method
DoLimit
Contact the cache and perform rate limiting for a set of descriptors and limits. @param ctx supplies the request context. @param request supplies the
src/redis/cache.go:34
↓ 26 callers
Method
GetLimit
Get the configured limit for a rate limit descriptor. @param ctx supplies the calling context. @param domain supplies the domain to lookup the descrip
src/config/config.go:47
↓ 26 callers
Method
ShouldRateLimit
Determine whether rate limiting should take place.
proto/ratelimit/ratelimit.pb.go:436
↓ 24 callers
Method
Put
Put a connection back into the pool. @param c supplies the connection to put back.
src/redis/driver.go:18
↓ 23 callers
Method
Int
@return the response as an integer. Throws a RedisError if the response is not convertable to an integer.
src/redis/driver.go:38
↓ 22 callers
Method
GetStatsStore
()
src/service_cmd/runner/runner.go:32
↓ 22 callers
Function
NewRateLimitRequest
(domain string, descriptors [][][2]string, hitsAddend uint32)
test/common/common.go:40
↓ 21 callers
Method
Error
()
src/redis/driver.go:6
↓ 18 callers
Method
EXPECT
()
test/mocks/redis/redis.go:145
↓ 18 callers
Method
UnixNow
@return the current unix time in seconds.
src/redis/cache.go:12
↓ 17 callers
Method
EXPECT
()
test/mocks/redis/redis.go:176
↓ 17 callers
Function
NewRateLimit
Create a new rate limit config entry. @param requestsPerUnit supplies the requests per unit of time for the entry. @param unit supplies the unit of ti
src/config/config_impl.go:74
↓ 17 callers
Method
Run
()
src/service_cmd/runner/runner.go:36
↓ 15 callers
Function
getCacheKey
(cacheKey string, enableLocalCache bool)
test/integration/integration_test.go:97
↓ 14 callers
Method
Scope
** * Returns the root of the stats tree for the server */
src/server/server.go:22
↓ 13 callers
Function
NewRateLimitConfigImpl
Create rate limit config from a list of input YAML files. @param configs specifies a list of YAML files to load. @param stats supplies the stats scope
src/config/config_impl.go:292
↓ 12 callers
Function
loadFile
(path string)
test/config/config_test.go:14
↓ 11 callers
Function
newRateLimitConfigError
Create a new config error which includes the owning file. @param config supplies the config file that generated the error. @param err supplies the err
src/config/config_impl.go:97
↓ 10 callers
Function
NewRateLimitRequestLegacy
(domain string, descriptors [][][2]string, hitsAddend uint32)
test/common/common.go:56
↓ 10 callers
Function
commonSetup
(t *testing.T)
test/service/ratelimit_test.go:61
↓ 10 callers
Function
expectConfigPanic
(t *testing.T, call func(), expectedError string)
test/config/config_test.go:153
↓ 9 callers
Method
Set
(arg string)
src/client_cmd/main.go:20
↓ 9 callers
Method
String
()
src/client_cmd/main.go:35
↓ 8 callers
Method
GetLegacyService
()
src/service/ratelimit.go:46
↓ 8 callers
Method
Load
Load a new configuration from a list of YAML files. @param configs supplies a list of full YAML files in string form. @param statsScope supplies the s
src/config/config.go:63
↓ 8 callers
Method
setupBasicService
()
test/service/ratelimit_test.go:74
↓ 7 callers
Method
Error
()
src/config/config.go:18
↓ 4 callers
Method
AddUpdateCallback
AddUpdateCallback mocks base method
test/mocks/runtime/loader/loader.go:37
↓ 4 callers
Method
Keys
Keys mocks base method
test/mocks/runtime/snapshot/snapshot.go:110
↓ 4 callers
Method
Snapshot
Snapshot mocks base method
test/mocks/runtime/loader/loader.go:47
↓ 4 callers
Function
checkError
(err error)
src/redis/driver_impl.go:42
↓ 4 callers
Function
newDescriptorStatus
( status pb.RateLimitResponse_Code, requestsPerUnit uint32, unit pb.RateLimitResponse_RateLimit_Unit, limitR
test/integration/integration_test.go:22
↓ 4 callers
Function
newDescriptorStatusLegacy
( status pb_legacy.RateLimitResponse_Code, requestsPerUnit uint32, unit pb_legacy.RateLimit_Unit, limitRemai
test/integration/integration_test.go:33
↓ 4 callers
Method
signal
()
test/service/ratelimit_test.go:27
↓ 4 callers
Function
testBasicConfig
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:77
↓ 4 callers
Function
testBasicConfigAuth
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:87
↓ 4 callers
Function
testBasicConfigAuthTLS
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:67
↓ 4 callers
Function
testLocalCacheStats
(localCacheStats stats.StatGenerator, statsStore stats.Store, sink *common.TestStatSink, expectedHitCount int
test/redis/cache_impl_test.go:155
↓ 4 callers
Method
wait
()
test/service/ratelimit_test.go:34
↓ 3 callers
Method
AddDebugHttpEndpoint
** * Add an HTTP endpoint to the local debug port. */
src/server/server.go:27
↓ 3 callers
Function
Assert
(something bool)
src/assert/assert.go:8
↓ 3 callers
Function
NewHealthChecker
(grpcHealthServer *health.Server, name string)
src/server/health.go:20
↓ 3 callers
Method
Reset
()
proto/ratelimit/ratelimit.pb.go:266
↓ 3 callers
Function
checkServiceErr
(something bool, msg string)
src/service/ratelimit.go:97
↓ 3 callers
Function
testBasicBaseConfig
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:105
↓ 3 callers
Function
unitToDivider
Convert a rate limit into a time divider. @param unit supplies the unit to convert. @return the divider to use in time computations.
src/redis/cache_impl.go:38
↓ 2 callers
Method
Dump
Dump the configuration into string form for debugging.
src/config/config.go:40
↓ 2 callers
Method
Fail
()
src/server/health.go:49
↓ 2 callers
Method
GrpcServer
** * Returns the embedded gRPC server to be used for registering gRPC endpoints. */
src/server/server.go:32
↓ 2 callers
Method
Int63
@return a non-negative pseudo-random 63-bit integer as an int64.
src/redis/cache.go:18
↓ 2 callers
Function
NewPoolImpl
(scope stats.Scope, useTls bool, auth string, url string, poolSize int)
src/redis/driver_impl.go:70
↓ 2 callers
Function
NewSettings
()
src/settings/settings.go:39
↓ 2 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
src/server/health.go:40
↓ 2 callers
Function
convertRatelimits
(ratelimits []*config.RateLimit)
test/service/ratelimit_legacy_test.go:40
↓ 2 callers
Function
max
(a uint32, b uint32)
src/redis/cache_impl.go:95
↓ 2 callers
Function
newBarrier
()
test/service/ratelimit_test.go:43
↓ 2 callers
Function
pipelineAppend
(conn Connection, key string, hitsAddend uint32, expirationSeconds int64)
src/redis/cache_impl.go:108
↓ 2 callers
Function
pipelineFetch
(conn Connection)
src/redis/cache_impl.go:113
↓ 2 callers
Method
reloadConfig
()
src/service/ratelimit.go:61
↓ 2 callers
Function
testRedis
(usePerSecondRedis bool)
test/redis/cache_impl_test.go:26
↓ 1 callers
Method
Clear
()
test/common/common.go:16
↓ 1 callers
Function
ConvertLegacyRequest
(legacyRequest *pb_legacy.RateLimitRequest)
src/service/ratelimit_legacy.go:61
↓ 1 callers
Function
ConvertResponse
(response *pb.RateLimitResponse)
src/service/ratelimit_legacy.go:81
↓ 1 callers
Method
EXPECT
()
test/mocks/redis/redis.go:207
↓ 1 callers
Method
Error
()
src/service/ratelimit.go:93
↓ 1 callers
Method
GenerateStats
()
src/redis/local_cache_stats.go:34
↓ 1 callers
Method
GetCurrentConfig
()
src/service/ratelimit.go:45
↓ 1 callers
Method
GetCurrentConfig
()
src/service/ratelimit.go:171
↓ 1 callers
Function
GrpcUnaryInterceptor
(i grpc.UnaryServerInterceptor)
src/settings/settings.go:50
↓ 1 callers
Function
NewLocalCacheStats
(localCache *freecache.Cache, scope stats.Scope)
src/redis/local_cache_stats.go:20
↓ 1 callers
Function
NewLockedSource
(seed int64)
src/redis/cache_impl.go:327
↓ 1 callers
Function
NewRateLimitCacheImpl
(pool Pool, perSecondPool Pool, timeSource TimeSource, jitterRand *rand.Rand, expirationJitterMaxSeconds int64
src/redis/cache_impl.go:291
↓ 1 callers
Function
NewRateLimitConfigLoaderImpl
@return a new default config loader implementation.
src/config/config_impl.go:312
↓ 1 callers
Function
NewServer
(name string, store stats.Store, localCache *freecache.Cache, opts ...settings.Option)
src/server/server_impl.go:105
↓ 1 callers
Function
NewTimeSourceImpl
()
src/redis/cache_impl.go:313
↓ 1 callers
Method
Runtime
** * Returns the runtime configuration for the server. */
src/server/server.go:37
↓ 1 callers
Method
Seed
@param seed initializes pseudo-random generator to a deterministic state.
src/redis/cache.go:20
↓ 1 callers
Method
Server
()
src/server/health.go:54
↓ 1 callers
Method
Start
** * Starts the HTTP and gRPC servers. This should be done after * all endpoints have been registered through 'AddHttpEndpoint' * and 'GrpcServe
src/server/server.go:17
↓ 1 callers
Function
convertRatelimit
(ratelimit *pb.RateLimitResponse_RateLimit)
test/service/ratelimit_legacy_test.go:20
↓ 1 callers
Method
dump
Dump an individual descriptor for debugging purposes.
src/config/config_impl.go:81
↓ 1 callers
Method
generateCacheKey
Generate a cache key for a limit lookup. @param domain supplies the cache key domain. @param descriptor supplies the descriptor to generate the key fo
src/redis/cache_impl.go:59
↓ 1 callers
Method
handleGracefulShutdown
()
src/server/server_impl.go:194
↓ 1 callers
Function
isPerSecondLimit
(unit pb.RateLimitResponse_RateLimit_Unit)
src/redis/cache_impl.go:91
↓ 1 callers
Method
loadConfig
Load a single YAML config file into the global config. @param config specifies the file contents to load. @param statsScope supplies the owning scope.
src/config/config_impl.go:201
↓ 1 callers
Function
loadConfigs
(allConfigs []config.RateLimitConfigToLoad)
src/config_check_cmd/main.go:14
↓ 1 callers
Method
loadDescriptors
Load a set of config descriptors from the YAML file and check the input. @param config supplies the config file that owns the descriptor. @param paren
src/config/config_impl.go:106
↓ 1 callers
Function
newBufferPool
()
src/redis/cache_impl.go:303
↓ 1 callers
Function
newPoolStats
(scope stats.Scope)
src/redis/driver_impl.go:20
↓ 1 callers
Function
newRateLimitStats
Create new rate limit stats for a config entry. @param statsScope supplies the owning scope. @param key supplies the fully resolved key name of the en
src/config/config_impl.go:59
↓ 1 callers
Function
newServer
(name string, store stats.Store, localCache *freecache.Cache, opts ...settings.Option)
src/server/server_impl.go:109
↓ 1 callers
Function
newServiceStats
(scope stats.Scope)
src/service/ratelimit.go:35
↓ 1 callers
Function
newShouldRateLimitLegacyStats
(scope stats.Scope)
src/service/ratelimit_legacy.go:28
↓ 1 callers
Function
newShouldRateLimitStats
(scope stats.Scope)
src/service/ratelimit.go:22
↓ 1 callers
Method
shouldRateLimitWorker
( ctx context.Context, request *pb.RateLimitRequest)
src/service/ratelimit.go:103
next →
1–100 of 294, ranked by callers