config example changed, some comments removed

This commit is contained in:
0ceanSlim 2024-07-26 10:40:31 -04:00
parent f8138cb2cb
commit 4c5375a429
4 changed files with 11 additions and 15 deletions

View File

@ -6,19 +6,18 @@ server:
port: ":8080" # Port for the server to listen on
rate_limit:
#WS is not working as intended. It's only working for accepting Events, which is what event is supposed to do
ws_limit: 100 # Global rate limit for WebSocket messages (50 messages per second)
ws_burst: 200 # Global burst limit for WebSocket messages (allows a burst of 100 messages)
#event limit doesn't seem to work either
event_limit: 50 # Global rate limit for events (25 events per second)
event_burst: 100 # Global burst limit for events (allows a burst of 50 events)
ws_limit: 100 # Global rate limit for WebSocket messages (100 messages per second)
ws_burst: 200 # Global burst limit for WebSocket messages (allows a burst of 200 messages)
event_limit: 50 # Global rate limit for events (50 events per second)
event_burst: 100 # Global burst limit for events (allows a burst of 100 events)
req_limit: 50 # Added limit for REQ messages
req_burst: 100 # Added burst limit for REQ messages
category_limits: # Rate limits based on event categories
regular:
limit: 25 # Rate limit for regular events (50 events per second)
burst: 50 # Burst limit for regular events (allows a burst of 100 events)
limit: 25 # Rate limit for regular events (25 events per second)
burst: 50 # Burst limit for regular events (allows a burst of 50 events)
replaceable:
limit: 10 # Rate limit for replaceable events (10 events per second)
burst: 20 # Burst limit for replaceable events (allows a burst of 20 events)
@ -34,8 +33,8 @@ rate_limit:
limit: 1 # Rate limit for events of kind 0 (1 event per second)
burst: 5 # Burst limit for events of kind 0 (allows a burst of 5 events)
- kind: 1
limit: 25 # Rate limit for events of kind 1 (100 events per second)
burst: 50 # Burst limit for events of kind 1 (allows a burst of 200 events)
limit: 25 # Rate limit for events of kind 1 (25 events per second)
burst: 50 # Burst limit for events of kind 1 (allows a burst of 50 events)
- kind: 3
limit: 10 # Rate limit for events of kind 3 (25 events per second)
burst: 20 # Burst limit for events of kind 3 (allows a burst of 50 events)
limit: 25 # Rate limit for events of kind 3 (25 events per second)
burst: 50 # Burst limit for events of kind 3 (allows a burst of 50 events)

View File

@ -1,4 +1,3 @@
// main.go
package main
import (

View File

@ -1,4 +1,3 @@
// event.go
package handlers
import (

View File

@ -1,4 +1,3 @@
// rateLimiter.go
package utils
import (