pub struct SinkFactory { /* private fields */ }Expand description
Factory for creating sinks from YAML configuration
Builds sink instances from SinkConfig entries. Some sinks can be
auto-created (InApp), while others require external dependencies
provided by the user (Push needs PushProvider, Counter needs EntityFieldUpdater,
WebSocket needs WebSocketDispatcher, Webhook needs HttpSender).
Sinks that cannot be auto-created are logged as warnings and skipped.
Implementations§
Source§impl SinkFactory
impl SinkFactory
Sourcepub fn with_stores(
notification_store: Arc<NotificationStore>,
preferences_store: Arc<NotificationPreferencesStore>,
device_token_store: Arc<DeviceTokenStore>,
) -> Self
pub fn with_stores( notification_store: Arc<NotificationStore>, preferences_store: Arc<NotificationPreferencesStore>, device_token_store: Arc<DeviceTokenStore>, ) -> Self
Create a SinkFactory with pre-existing stores
Sourcepub fn notification_store(&self) -> &Arc<NotificationStore>
pub fn notification_store(&self) -> &Arc<NotificationStore>
Get the notification store (for sharing with ServerHost)
Sourcepub fn preferences_store(&self) -> &Arc<NotificationPreferencesStore>
pub fn preferences_store(&self) -> &Arc<NotificationPreferencesStore>
Get the preferences store (for sharing with ServerHost)
Sourcepub fn device_token_store(&self) -> &Arc<DeviceTokenStore>
pub fn device_token_store(&self) -> &Arc<DeviceTokenStore>
Get the device token store (for sharing with ServerHost)
Sourcepub fn build_registry(&self, sink_configs: &[SinkConfig]) -> SinkRegistry
pub fn build_registry(&self, sink_configs: &[SinkConfig]) -> SinkRegistry
Build a SinkRegistry from a list of SinkConfigs
Auto-creates sinks that don’t need external dependencies (InApp). Logs warnings for sinks that need manual wiring (Push, WebSocket, Counter, Webhook).