A running Limen instance: its configuration and handles to its state.
When an instance starts, it creates its tables and counters and publishes
this struct in :persistent_term under its name. The request path reads it
once, at the start of each request, and hands it down in the
Limen.Context: finding an instance never involves a process, a registry or
an ETS lookup.
Changing an instance's configuration at runtime (update_config/3)
republishes the struct, which triggers a global GC scan in the runtime:
treat it as an operator action, not something to do per request.
Summary
Functions
Returns the running instance name.
Returns the running instance name, or nil.
The instance name given by an :instance or an :otp_app option, as
Limen.Plug and the socket checks take it.
Validates and changes one configuration option of a running instance.
The pid of the process with child id id in the instance's supervisor.
Types
@type t() :: %Limen.Instance{ config: Limen.Config.t(), cookie_pattern: :binary.cp() | nil, log: map() | nil, maze: :atomics.atomics_ref() | nil, name: atom(), pass_binding: [:prefix | :ja4 | :user_agent] | nil, replay: term(), state: map() | nil, stats: :counters.counters_ref() | nil, supervisor: pid() | nil, tarpit: :atomics.atomics_ref() | nil }
Functions
Returns the running instance name.
Raises if it is not running.
Returns the running instance name, or nil.
The instance name given by an :instance or an :otp_app option, as
Limen.Plug and the socket checks take it.
Validates and changes one configuration option of a running instance.
Keyword lists are merged into the option's current value, see
Limen.Config.update/3. Raises ArgumentError on an invalid value, or
for an option only read when the instance starts.
The pid of the process with child id id in the instance's supervisor.