api

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCRouter

type RPCRouter struct {
	Node rpc.Node
	// contains filtered or unexported fields
}

func NewRPCRouter

func NewRPCRouter(
	cfg RPCRouterConfig,
	node rpc.Node,
	signer sign.Signer,
	dbStore database.DatabaseStore,
	memoryStore memory.MemoryStore,
	actionGateway *action_gateway.ActionGateway,
	runtimeMetrics metrics.RuntimeMetricExporter,
	logger log.Logger,
) *RPCRouter

func (*RPCRouter) ObservabilityMiddleware

func (r *RPCRouter) ObservabilityMiddleware(c *rpc.Context)

func (*RPCRouter) RateLimitMiddleware

func (r *RPCRouter) RateLimitMiddleware(c *rpc.Context)

RateLimitMiddleware enforces per-connection rate limiting using a token bucket algorithm. It stores the token bucket in the connection's Storage for persistence across requests.

type RPCRouterConfig

type RPCRouterConfig struct {
	NodeVersion  string
	MinChallenge uint32

	MaxParticipants           int
	MaxSessionDataLen         int
	MaxAppMetadataLen         int
	MaxRebalanceSignedUpdates int
	MaxSessionKeyIDs          int

	RateLimitPerSec float64
	RateLimitBurst  float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL