mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-16 01:45:40 +00:00
a00f350cd1
* feat: Added simple, configurable rate limit for lightpush and store-query Adjust lightpush rest response to rate limit, added tests ann some fixes Add rest store query test for rate limit checks and proper error response Update apps/wakunode2/external_config.nim Move chronos/tokenbucket to nwaku codebasee with limited and fixed feature set Add meterics counter to lightpush rate limits Co-authored-by: gabrielmer <101006718+gabrielmer@users.noreply.github.com>
13 lines
370 B
Nim
13 lines
370 B
Nim
when (NimMajor, NimMinor) < (1, 4):
|
|
{.push raises: [Defect].}
|
|
else:
|
|
{.push raises: [].}
|
|
|
|
import metrics
|
|
|
|
declarePublicCounter waku_service_requests,
|
|
"number of non-relay service requests received", ["service"]
|
|
declarePublicCounter waku_service_requests_rejected,
|
|
"number of non-relay service requests received being rejected due to limit overdue",
|
|
["service"]
|