namespace ZB.MOM.WW.ScadaBridge.AuditLog.Site; /// /// Options for the site-side SQLite hot-path audit writer. /// Mirrors the ZB.MOM.WW.ScadaBridge.SiteEventLogging pattern: a single SQLite connection /// fed by a background writer task draining a bounded /// so script-thread enqueues /// never block on disk I/O. /// public sealed class SqliteAuditWriterOptions { /// SQLite database path (or in-memory URI for tests). public string DatabasePath { get; set; } = "auditlog.db"; /// /// Capacity of the bounded write queue. Set high enough that ordinary /// script bursts never fill it; /// applies when the writer falls behind. /// public int ChannelCapacity { get; set; } = 4096; /// Max number of pending events the writer drains in one transaction. public int BatchSize { get; set; } = 256; /// Soft flush interval the writer enforces when fewer than BatchSize events are queued. public int FlushIntervalMs { get; set; } = 50; /// /// Poll cadence, in seconds, for the SiteAuditBacklogReporter hosted service /// that probes the SQLite audit backlog and pushes the snapshot onto the site health /// report. Half a typical 60 s health-report interval keeps the snapshot fresh without /// spinning the SQL probe more often than necessary. A non-positive value falls back to /// the reporter's 30 s default. /// public int BacklogPollIntervalSeconds { get; set; } = 30; }