using ScadaLink.Commons.Entities.Audit;
namespace ScadaLink.AuditLog.Site.Telemetry;
///
/// Site-local audit-log queue surface consumed by .
/// Extracted from so the telemetry actor can be
/// unit-tested against a stub without touching SQLite.
/// implements this interface; production wiring injects the same instance.
///
///
/// Only the two methods the drain loop needs are exposed — the hot-path
/// WriteAsync stays on
/// (script-thread surface), separated by concern from the
/// telemetry-actor surface so each side can be mocked independently.
///
public interface ISiteAuditQueue
{
///
/// Returns up to rows currently in
/// ,
/// oldest first. Idempotent — repeated calls before
/// will yield the same rows again.
///
Task> ReadPendingAsync(int limit, CancellationToken ct = default);
///
/// Flips the supplied EventIds from
/// to
/// .
/// Non-existent or already-forwarded ids are silent no-ops.
///
Task MarkForwardedAsync(IReadOnlyList eventIds, CancellationToken ct = default);
}