feat(commons): add audit telemetry + pull message DTOs (#23)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using ScadaLink.Commons.Entities.Audit;
|
||||
|
||||
namespace ScadaLink.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Audit Log (#23) telemetry envelope sent from a site to central over gRPC.
|
||||
/// At-least-once delivery; central is idempotent on <see cref="AuditEvent.EventId"/>.
|
||||
/// See Component-AuditLog.md "Ingestion" for the handoff contract.
|
||||
/// </summary>
|
||||
public sealed record AuditTelemetryEnvelope(
|
||||
Guid EnvelopeId,
|
||||
string SourceSiteId,
|
||||
IReadOnlyList<AuditEvent> Events);
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace ScadaLink.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Audit Log (#23) periodic reconciliation pull request: central asks a site for
|
||||
/// audit events since the given UTC watermark, up to <paramref name="BatchSize"/>.
|
||||
/// Acts as the fallback when streaming telemetry is lost. See Component-AuditLog.md "Ingestion".
|
||||
/// </summary>
|
||||
public sealed record PullAuditEventsRequest(
|
||||
string SourceSiteId,
|
||||
DateTime SinceUtc,
|
||||
int BatchSize);
|
||||
@@ -0,0 +1,12 @@
|
||||
using ScadaLink.Commons.Entities.Audit;
|
||||
|
||||
namespace ScadaLink.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Audit Log (#23) periodic reconciliation pull response: the next batch of site
|
||||
/// audit events plus a <paramref name="MoreAvailable"/> flag signalling the caller
|
||||
/// to advance the watermark and pull again. See Component-AuditLog.md "Ingestion".
|
||||
/// </summary>
|
||||
public sealed record PullAuditEventsResponse(
|
||||
IReadOnlyList<AuditEvent> Events,
|
||||
bool MoreAvailable);
|
||||
Reference in New Issue
Block a user