refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Audit;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.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,34 @@
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Audit;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Types;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Combined audit + operational telemetry packet for cached outbound calls
|
||||
/// (Audit Log #23 / M3). The site emits one packet per lifecycle event
|
||||
/// — <c>Submit</c> (Audit kind <c>CachedSubmit</c>), per-attempt
|
||||
/// <c>ApiCallCached</c>/<c>DbWriteCached</c>, terminal <c>CachedResolve</c> —
|
||||
/// and central writes the <see cref="AuditEvent"/> row plus the
|
||||
/// <see cref="SiteCallOperational"/> upsert in one MS SQL transaction. Two
|
||||
/// payload shapes ride on a single wire message so the same on-the-wire batch
|
||||
/// can carry mixed lifecycle events without the central dual-write needing a
|
||||
/// second RPC for the operational state.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Both inner records carry the same <c>TrackedOperationId</c> — the
|
||||
/// idempotency key end-to-end. The <see cref="AuditEvent.CorrelationId"/>
|
||||
/// pattern (used by Audit Log #23 to thread cached-call rows together) is
|
||||
/// honoured by the site emitter; the packet itself is shape-only and makes no
|
||||
/// independent correlation guarantees.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Additive-only per Commons REQ-COM-5a (M2 reviewer note) — this is a new
|
||||
/// message, not a rename of any existing M2 envelope.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <param name="Audit">The Audit Log #23 row to insert at central.</param>
|
||||
/// <param name="Operational">The <c>SiteCalls</c> upsert mirroring this lifecycle event.</param>
|
||||
public sealed record CachedCallTelemetry(
|
||||
AuditEvent Audit,
|
||||
SiteCallOperational Operational);
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Request routed from central to site to invoke an integration method
|
||||
/// (external system call or notification) on behalf of the central UI or API.
|
||||
/// </summary>
|
||||
public record IntegrationCallRequest(
|
||||
string CorrelationId,
|
||||
string SiteId,
|
||||
string InstanceUniqueName,
|
||||
string TargetSystemName,
|
||||
string MethodName,
|
||||
IReadOnlyDictionary<string, object?> Parameters,
|
||||
DateTimeOffset Timestamp);
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Integration;
|
||||
|
||||
/// <summary>
|
||||
/// Response for an integration call routed through central-site communication.
|
||||
/// </summary>
|
||||
public record IntegrationCallResponse(
|
||||
string CorrelationId,
|
||||
string SiteId,
|
||||
bool Success,
|
||||
string? ResultJson,
|
||||
string? ErrorMessage,
|
||||
DateTimeOffset Timestamp);
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace ZB.MOM.WW.ScadaBridge.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 ZB.MOM.WW.ScadaBridge.Commons.Entities.Audit;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.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