using System.Threading; using System.Threading.Tasks; using GB5Shared.DTO.GOP; namespace FrameworkBLL.GOP { // ============================================================ // IGopHubNotifier — abstraction over SignalR hub push. // // The concrete implementation (GopHubNotifier in FrameworkSL) // wraps IHubContext. // This abstraction keeps FrameworkBLL free of ASP.NET types. // // The BLL (and BackgroundService worker) call this interface // to push real-time status updates to connected UI clients. // // Registration: // In FrameworkSL Program.cs: // services.AddSingleton(); // ============================================================ public interface IGopHubNotifier { /// /// Push an execution status update to all SignalR clients /// connected in the "gop:client:{clientId}" group. /// Must not throw — failures are logged and swallowed. /// Task PushExecutionUpdate(int clientId, GopExecutionStatusDTO status, CancellationToken ct = default); /// /// Push a DLQ summary update to all SignalR clients in the /// tenant group when a new dead-letter entry is created. /// Must not throw — failures are logged and swallowed. /// Task PushDLQUpdate(int clientId, GopDLQSummaryDTO summary, CancellationToken ct = default); } }