Make RCON Data Bridge configuration sandbox-tunable and refactor constants access
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
|
||||
RDB_Constants = {}
|
||||
|
||||
RDB_Constants.DEBUG = true
|
||||
|
||||
RDB_Constants.PROTOCOL_VERSION = 1
|
||||
|
||||
RDB_Constants.OPT = {
|
||||
@@ -22,16 +20,6 @@ RDB_Constants.PLAYER_STATS_PREFIX = "RconDataBridge_PlayerStats_"
|
||||
|
||||
RDB_Constants.MAX_PAYLOAD_BYTES = 4096
|
||||
RDB_Constants.OPTION_MAX_LENGTH = 8192
|
||||
RDB_Constants.POLL_EVERY_TICKS = 30
|
||||
|
||||
-- How long a request id's cached response is replayed for on retry before
|
||||
-- it's treated as expired and the op runs again. Deliberately short: a
|
||||
-- client that reuses a fixed id for routine polling (e.g. "ws-poll" every
|
||||
-- few minutes) should get a fresh answer each time, not the first-ever
|
||||
-- response forever. A count-based cap alone (MAX_ENTRIES in
|
||||
-- RDB_Idempotency) doesn't help here, it only evicts under high request
|
||||
-- volume, never under low-and-slow polling, which is exactly this case.
|
||||
RDB_Constants.IDEMPOTENCY_TTL_MS = 60 * 1000
|
||||
|
||||
RDB_Constants.ERROR_CODES = {
|
||||
SCHEMA_ERROR = "SCHEMA_ERROR",
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Sandbox_RconDataBridge": "RCON Data Bridge",
|
||||
"Sandbox_RconDataBridge_DebugSelfTest": "Debug Self-Tests",
|
||||
"Sandbox_RconDataBridge_DebugSelfTest_tooltip": "Run RDB_Json/RDB_Base64 self-tests and log the result on every server boot.",
|
||||
"Sandbox_RconDataBridge_PollEveryTicks": "Poll Interval (ticks)",
|
||||
"Sandbox_RconDataBridge_PollEveryTicks_tooltip": "How many server ticks between checks of the request mailbox and the online-player roster. Lower is more responsive, higher is less overhead.",
|
||||
"Sandbox_RconDataBridge_IdempotencyTtlSeconds": "Idempotency Window (seconds)",
|
||||
"Sandbox_RconDataBridge_IdempotencyTtlSeconds_tooltip": "How long a repeated request id replays its cached response instead of running again.",
|
||||
"Sandbox_RconDataBridge_RateLimitMaxRequests": "Rate Limit: Max Requests",
|
||||
"Sandbox_RconDataBridge_RateLimitMaxRequests_tooltip": "Maximum RCON Data Bridge requests allowed per rate-limit window.",
|
||||
"Sandbox_RconDataBridge_RateLimitWindowSeconds": "Rate Limit: Window (seconds)",
|
||||
"Sandbox_RconDataBridge_RateLimitWindowSeconds_tooltip": "Length of the rolling rate-limit window, in seconds."
|
||||
}
|
||||
Reference in New Issue
Block a user