configs
configs
¶
Synchronizer service configuration models.
See Also
Synchronizer: The service
class that consumes these configurations.
BaseServiceConfig:
Base class providing interval and log_level fields.
Classes¶
FilterConfig
¶
Bases: BaseModel
Nostr event filter configuration for sync subscriptions.
See Also
_create_filter:
Converts this config into a nostr-sdk Filter object.
SynchronizerConfig:
Parent config that embeds this model.
Functions¶
validate_kinds
classmethod
¶
Validate that all event kinds are within the valid range (0-65535).
Source code in src/bigbrotr/services/synchronizer/configs.py
validate_hex_strings
classmethod
¶
Validate that all entries are valid 64-character hex strings.
Source code in src/bigbrotr/services/synchronizer/configs.py
TimeRangeConfig
¶
Bases: BaseModel
Time range configuration controlling the sync window boundaries.
Note
When use_relay_state is True (the default), the sync
start time is determined by the per-relay cursor plus one second
(to avoid re-fetching the last event). When False, all relays
start from default_start. The lookback_seconds parameter
controls how far back from now() the sync window extends.
See Also
SynchronizerConfig:
Parent config that embeds this model.
get_all_service_cursors:
Fetches the per-relay cursor values used when
use_relay_state is enabled.
TimeoutsConfig
¶
Bases: BaseModel
Per-relay sync timeout limits by network type.
These are the maximum total times allowed for syncing a single relay. The per-request WebSocket timeout comes from NetworksConfig.
See Also
SynchronizerConfig: Parent config that embeds this model.
Functions¶
get_relay_timeout
¶
get_relay_timeout(network: NetworkType) -> float
Get the maximum sync duration for a relay on the given network.
Source code in src/bigbrotr/services/synchronizer/configs.py
ConcurrencyConfig
¶
Bases: BaseModel
Concurrency settings for parallel relay connections.
See Also
SynchronizerConfig: Parent config that embeds this model.
SourceConfig
¶
Bases: BaseModel
Configuration for selecting which relays to sync from.
See Also
SynchronizerConfig:
Parent config that embeds this model.
get_all_relays:
Query used when from_database is True.
RelayOverrideTimeouts
¶
Bases: BaseModel
Per-relay timeout overrides (None means use the network default).
RelayOverride
¶
Bases: BaseModel
Per-relay configuration overrides (e.g., for high-traffic relays).
SynchronizerConfig
¶
Bases: BaseServiceConfig
Synchronizer service configuration.
See Also
Synchronizer: The
service class that consumes this configuration.
BaseServiceConfig:
Base class providing interval and log_level fields.
NetworksConfig:
Per-network timeout and proxy settings.
KeysConfig: Nostr key management
for NIP-42 authentication during event fetching.