MCPcopy Create free account

hub / github.com/envoyproxy/ratelimit / functions

Functions294 in github.com/envoyproxy/ratelimit

↓ 79 callersMethodEXPECT
()
test/mocks/redis/redis.go:62
↓ 71 callersMethodEXPECT
()
test/mocks/redis/redis.go:101
↓ 39 callersMethodPipeAppend
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 callersMethodPipeResponse
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 callersMethodGet
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 callersMethodDoLimit
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 callersMethodGetLimit
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 callersMethodShouldRateLimit
Determine whether rate limiting should take place.
proto/ratelimit/ratelimit.pb.go:436
↓ 24 callersMethodPut
Put a connection back into the pool. @param c supplies the connection to put back.
src/redis/driver.go:18
↓ 23 callersMethodInt
@return the response as an integer. Throws a RedisError if the response is not convertable to an integer.
src/redis/driver.go:38
↓ 22 callersMethodGetStatsStore
()
src/service_cmd/runner/runner.go:32
↓ 22 callersFunctionNewRateLimitRequest
(domain string, descriptors [][][2]string, hitsAddend uint32)
test/common/common.go:40
↓ 21 callersMethodError
()
src/redis/driver.go:6
↓ 18 callersMethodEXPECT
()
test/mocks/redis/redis.go:145
↓ 18 callersMethodUnixNow
@return the current unix time in seconds.
src/redis/cache.go:12
↓ 17 callersMethodEXPECT
()
test/mocks/redis/redis.go:176
↓ 17 callersFunctionNewRateLimit
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 callersMethodRun
()
src/service_cmd/runner/runner.go:36
↓ 15 callersFunctiongetCacheKey
(cacheKey string, enableLocalCache bool)
test/integration/integration_test.go:97
↓ 14 callersMethodScope
** * Returns the root of the stats tree for the server */
src/server/server.go:22
↓ 13 callersFunctionNewRateLimitConfigImpl
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 callersFunctionloadFile
(path string)
test/config/config_test.go:14
↓ 11 callersFunctionnewRateLimitConfigError
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 callersFunctionNewRateLimitRequestLegacy
(domain string, descriptors [][][2]string, hitsAddend uint32)
test/common/common.go:56
↓ 10 callersFunctioncommonSetup
(t *testing.T)
test/service/ratelimit_test.go:61
↓ 10 callersFunctionexpectConfigPanic
(t *testing.T, call func(), expectedError string)
test/config/config_test.go:153
↓ 9 callersMethodSet
(arg string)
src/client_cmd/main.go:20
↓ 9 callersMethodString
()
src/client_cmd/main.go:35
↓ 8 callersMethodGetLegacyService
()
src/service/ratelimit.go:46
↓ 8 callersMethodLoad
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 callersMethodsetupBasicService
()
test/service/ratelimit_test.go:74
↓ 7 callersMethodError
()
src/config/config.go:18
↓ 4 callersMethodAddUpdateCallback
AddUpdateCallback mocks base method
test/mocks/runtime/loader/loader.go:37
↓ 4 callersMethodKeys
Keys mocks base method
test/mocks/runtime/snapshot/snapshot.go:110
↓ 4 callersMethodSnapshot
Snapshot mocks base method
test/mocks/runtime/loader/loader.go:47
↓ 4 callersFunctioncheckError
(err error)
src/redis/driver_impl.go:42
↓ 4 callersFunctionnewDescriptorStatus
( status pb.RateLimitResponse_Code, requestsPerUnit uint32, unit pb.RateLimitResponse_RateLimit_Unit, limitR
test/integration/integration_test.go:22
↓ 4 callersFunctionnewDescriptorStatusLegacy
( status pb_legacy.RateLimitResponse_Code, requestsPerUnit uint32, unit pb_legacy.RateLimit_Unit, limitRemai
test/integration/integration_test.go:33
↓ 4 callersMethodsignal
()
test/service/ratelimit_test.go:27
↓ 4 callersFunctiontestBasicConfig
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:77
↓ 4 callersFunctiontestBasicConfigAuth
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:87
↓ 4 callersFunctiontestBasicConfigAuthTLS
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:67
↓ 4 callersFunctiontestLocalCacheStats
(localCacheStats stats.StatGenerator, statsStore stats.Store, sink *common.TestStatSink, expectedHitCount int
test/redis/cache_impl_test.go:155
↓ 4 callersMethodwait
()
test/service/ratelimit_test.go:34
↓ 3 callersMethodAddDebugHttpEndpoint
** * Add an HTTP endpoint to the local debug port. */
src/server/server.go:27
↓ 3 callersFunctionAssert
(something bool)
src/assert/assert.go:8
↓ 3 callersFunctionNewHealthChecker
(grpcHealthServer *health.Server, name string)
src/server/health.go:20
↓ 3 callersMethodReset
()
proto/ratelimit/ratelimit.pb.go:266
↓ 3 callersFunctioncheckServiceErr
(something bool, msg string)
src/service/ratelimit.go:97
↓ 3 callersFunctiontestBasicBaseConfig
(grpcPort, perSecond string, local_cache_size string)
test/integration/integration_test.go:105
↓ 3 callersFunctionunitToDivider
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 callersMethodDump
Dump the configuration into string form for debugging.
src/config/config.go:40
↓ 2 callersMethodFail
()
src/server/health.go:49
↓ 2 callersMethodGrpcServer
** * Returns the embedded gRPC server to be used for registering gRPC endpoints. */
src/server/server.go:32
↓ 2 callersMethodInt63
@return a non-negative pseudo-random 63-bit integer as an int64.
src/redis/cache.go:18
↓ 2 callersFunctionNewPoolImpl
(scope stats.Scope, useTls bool, auth string, url string, poolSize int)
src/redis/driver_impl.go:70
↓ 2 callersFunctionNewSettings
()
src/settings/settings.go:39
↓ 2 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
src/server/health.go:40
↓ 2 callersFunctionconvertRatelimits
(ratelimits []*config.RateLimit)
test/service/ratelimit_legacy_test.go:40
↓ 2 callersFunctionmax
(a uint32, b uint32)
src/redis/cache_impl.go:95
↓ 2 callersFunctionnewBarrier
()
test/service/ratelimit_test.go:43
↓ 2 callersFunctionpipelineAppend
(conn Connection, key string, hitsAddend uint32, expirationSeconds int64)
src/redis/cache_impl.go:108
↓ 2 callersFunctionpipelineFetch
(conn Connection)
src/redis/cache_impl.go:113
↓ 2 callersMethodreloadConfig
()
src/service/ratelimit.go:61
↓ 2 callersFunctiontestRedis
(usePerSecondRedis bool)
test/redis/cache_impl_test.go:26
↓ 1 callersMethodClear
()
test/common/common.go:16
↓ 1 callersFunctionConvertLegacyRequest
(legacyRequest *pb_legacy.RateLimitRequest)
src/service/ratelimit_legacy.go:61
↓ 1 callersFunctionConvertResponse
(response *pb.RateLimitResponse)
src/service/ratelimit_legacy.go:81
↓ 1 callersMethodEXPECT
()
test/mocks/redis/redis.go:207
↓ 1 callersMethodError
()
src/service/ratelimit.go:93
↓ 1 callersMethodGenerateStats
()
src/redis/local_cache_stats.go:34
↓ 1 callersMethodGetCurrentConfig
()
src/service/ratelimit.go:45
↓ 1 callersMethodGetCurrentConfig
()
src/service/ratelimit.go:171
↓ 1 callersFunctionGrpcUnaryInterceptor
(i grpc.UnaryServerInterceptor)
src/settings/settings.go:50
↓ 1 callersFunctionNewLocalCacheStats
(localCache *freecache.Cache, scope stats.Scope)
src/redis/local_cache_stats.go:20
↓ 1 callersFunctionNewLockedSource
(seed int64)
src/redis/cache_impl.go:327
↓ 1 callersFunctionNewRateLimitCacheImpl
(pool Pool, perSecondPool Pool, timeSource TimeSource, jitterRand *rand.Rand, expirationJitterMaxSeconds int64
src/redis/cache_impl.go:291
↓ 1 callersFunctionNewRateLimitConfigLoaderImpl
@return a new default config loader implementation.
src/config/config_impl.go:312
↓ 1 callersFunctionNewServer
(name string, store stats.Store, localCache *freecache.Cache, opts ...settings.Option)
src/server/server_impl.go:105
↓ 1 callersFunctionNewTimeSourceImpl
()
src/redis/cache_impl.go:313
↓ 1 callersMethodRuntime
** * Returns the runtime configuration for the server. */
src/server/server.go:37
↓ 1 callersMethodSeed
@param seed initializes pseudo-random generator to a deterministic state.
src/redis/cache.go:20
↓ 1 callersMethodServer
()
src/server/health.go:54
↓ 1 callersMethodStart
** * 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 callersFunctionconvertRatelimit
(ratelimit *pb.RateLimitResponse_RateLimit)
test/service/ratelimit_legacy_test.go:20
↓ 1 callersMethoddump
Dump an individual descriptor for debugging purposes.
src/config/config_impl.go:81
↓ 1 callersMethodgenerateCacheKey
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 callersMethodhandleGracefulShutdown
()
src/server/server_impl.go:194
↓ 1 callersFunctionisPerSecondLimit
(unit pb.RateLimitResponse_RateLimit_Unit)
src/redis/cache_impl.go:91
↓ 1 callersMethodloadConfig
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 callersFunctionloadConfigs
(allConfigs []config.RateLimitConfigToLoad)
src/config_check_cmd/main.go:14
↓ 1 callersMethodloadDescriptors
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 callersFunctionnewBufferPool
()
src/redis/cache_impl.go:303
↓ 1 callersFunctionnewPoolStats
(scope stats.Scope)
src/redis/driver_impl.go:20
↓ 1 callersFunctionnewRateLimitStats
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 callersFunctionnewServer
(name string, store stats.Store, localCache *freecache.Cache, opts ...settings.Option)
src/server/server_impl.go:109
↓ 1 callersFunctionnewServiceStats
(scope stats.Scope)
src/service/ratelimit.go:35
↓ 1 callersFunctionnewShouldRateLimitLegacyStats
(scope stats.Scope)
src/service/ratelimit_legacy.go:28
↓ 1 callersFunctionnewShouldRateLimitStats
(scope stats.Scope)
src/service/ratelimit.go:22
↓ 1 callersMethodshouldRateLimitWorker
( ctx context.Context, request *pb.RateLimitRequest)
src/service/ratelimit.go:103
next →1–100 of 294, ranked by callers