Lucerna. Config
(Lucerna v0.0.1-alpha.0)
Validated, immutable configuration for one Lucerna instance. Built once
in Lucerna.start_link/1 — bad options raise ArgumentError at boot,
never later. There is no application-env configuration by design: opts
go to the supervision child spec.
Times are milliseconds (BEAM convention). Porting from the Ruby gem?
Its refresh_interval: 10 (seconds) is refresh_interval: 10_000
here.
Summary
Functions
Validates opts into a config. Raises ArgumentError on any bad or
unknown option.
The reporting process name for an instance name.
The store process name for an instance name.
The ETS table name for an instance name — shared with the readers.
Types
@type t() :: %Lucerna.Config{ base_url: term(), finch_name: term(), http: term(), identity_key: term(), name: term(), refresh_interval: term(), reporting_name: term(), request_timeout: term(), sdk_identity: term(), server_key: term(), sleeper: term(), start_finch?: term(), store_name: term(), sync_name: term(), table: term(), track_exposures: term() }
Functions
Validates opts into a config. Raises ArgumentError on any bad or
unknown option.
Options:
:server_key— required. A server key (ck_srv_…/ck_key_…);ck_client_…browser keys are rejected.:base_url— defaults tohttps://api.uselucerna.app.:refresh_interval— runtime poll cadence in ms. Default10000, floored at1000.:request_timeout— per-request timeout in ms. Default5000.:track_exposures— record experiment exposures on variant reads. Defaulttrue.:identity_key— key forLucerna.identify/1; defaults to:server_key.:http—{adapter_module, adapter_opts}implementingLucerna.HTTP(the test seam). Defaults to the bundled Finch adapter.:name— instance name (atom), defaultLucerna. Everything — supervisor, ETS table, process names — derives from it, so two instances with different names coexist.
The reporting process name for an instance name.
The store process name for an instance name.
The ETS table name for an instance name — shared with the readers.