MCPcopy Create free account
hub / github.com/cameri/nostream / hit

Function hit

src/handlers/request-handlers/rate-limiter-middleware.ts:39–40  ·  view source on GitHub ↗
(period: number, rate: number)

Source from the content-addressed store, hash-verified

37 const rateLimiter = rateLimiterFactory()
38
39 const hit = (period: number, rate: number) =>
40 rateLimiter.hit(`${remoteAddress}:connection:${period}`, 1, { period: period, rate: rate })
41
42 let limited = false
43 for (const { rate, period } of rateLimits) {

Callers 3

isRateLimitedMethod · 0.85
isRateLimitedMethod · 0.85
isRateLimitedFunction · 0.85

Calls 1

hitMethod · 0.65

Tested by

no test coverage detected