using ScadaLink.Communication.Grpc;
namespace ScadaLink.AuditLog.Site.Telemetry;
///
/// Mockable abstraction over the central site-audit push surface that
/// uses to forward
/// payloads. The production implementation is
/// — a ClusterClient-based client,
/// wired in the Host for site roles, that forwards batches to central via the
/// site's SiteCommunicationActor. Unit tests substitute via NSubstitute
/// against this interface so the actor never needs a live transport.
///
public interface ISiteStreamAuditClient
{
///
/// Forwards to the central audit-ingest path. The
/// returned carries the accepted_event_ids
/// the actor will flip to
///
/// in the site SQLite queue.
///
Task IngestAuditEventsAsync(AuditEventBatch batch, CancellationToken ct);
///
/// Forwards the combined (Audit Log #23)
/// to the central cached-telemetry ingest path. Each packet carries both the
/// audit row and the operational SiteCalls upsert; central writes both
/// in a single MS SQL transaction. Returns the same
/// shape as so the site-side forwarder
/// can flip the underlying audit rows to
///
/// once central has acknowledged them.
///
///
/// The production forwards over
/// the ClusterClient transport; the
/// DI default (used by central and test composition roots) returns an empty
/// ack so no rows are flipped.
///
Task IngestCachedTelemetryAsync(CachedTelemetryBatch batch, CancellationToken ct);
}