Parrhesia.Web.PubkeyEventIngestLimiter (parrhesia v0.12.0)

Copy Markdown

Per-pubkey EVENT ingest rate limiting over a fixed time window.

This limiter is optional and defaults to disabled (max_events_per_window = 0).

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

allow(pubkey, server \\ __MODULE__)

@spec allow(String.t() | nil, GenServer.server()) ::
  :ok | {:error, :pubkey_event_rate_limited}

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()