Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MethodPathDomains ¶
MethodPathDomains returns the bounded `path` label domain per RPC method whose request payload determines path (matching getMethodPath's switch). Methods not in the map emit only path="default". Used by metrics seeding so absent()-style alerts have defined values for every (method, path, result) tuple at cold start, not just (method, "default", result).
Types ¶
type RPCRouter ¶
func NewRPCRouter ¶
func NewRPCRouter( cfg RPCRouterConfig, node rpc.Node, signer sign.Signer, dbStore database.DatabaseStore, memoryStore memory.MemoryStore, actionGateway action_gateway.ActionAllower, runtimeMetrics metrics.RuntimeMetricExporter, logger log.Logger, ) *RPCRouter
func (*RPCRouter) ObservabilityMiddleware ¶
func (*RPCRouter) RateLimitMiddleware ¶
RateLimitMiddleware enforces a per-connection request-count token bucket. It complements the per-frame byte budget enforced by FrameRateLimiter at the connection layer: bytes guard bandwidth, this guards RPC throughput so a flood of small requests cannot bypass the byte cap.
On overrun the request fails with an RPC error and the connection stays open; the byte limiter is the layer that closes connections.
type RPCRouterConfig ¶
type RPCRouterConfig struct {
NodeVersion string
MinChallenge uint32
MaxChallenge uint32
AppRegistryEnabled bool
MaxParticipants int
MaxSessionDataLen int
MaxAppMetadataLen int
MaxRebalanceSignedUpdates int
MaxSessionKeyIDs int
MaxSessionKeysPerUser int
RateLimitPerSec float64
RateLimitBurst float64
}