namespace ZB.MOM.WW.ScadaBridge.AuditLog.Central; /// /// Enumeration surface consumed by to /// discover which sites to poll on each reconciliation tick. Extracted so the /// actor can be unit-tested against a static list without depending on the /// production ISiteRepository + EF Core DbContext. /// /// /// The production implementation wraps ISiteRepository.GetAllSitesAsync /// and projects each Site to a using the /// site's configured GrpcNodeAAddress (falling back to /// GrpcNodeBAddress when NodeA is unset). Sites with NO gRPC address /// configured are silently skipped — the reconciliation pull cannot reach /// them, but absence of an address is a configuration decision, not a runtime /// error. /// public interface ISiteEnumerator { /// /// Returns the current set of sites the reconciliation puller should visit /// on the next tick. Implementations should reflect adds/removes promptly /// — the actor calls this once per tick. /// /// Cancellation token for the async enumeration. /// A task that resolves to the current set of site entries to poll on the next reconciliation tick. Task> EnumerateAsync(CancellationToken ct = default); } /// /// One reconciliation target: the site identifier the actor uses as the /// cursor key and the gRPC endpoint dials /// to issue the pull. Endpoint is the bare authority (e.g. http://siteA:8083); /// transport selection (TLS, keepalive, etc.) is the client's concern. /// public sealed record SiteEntry(string SiteId, string GrpcEndpoint);