namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions; /// /// Sink for driver-health state-change notifications. The runtime DI wires the /// Akka-DistributedPubSub-backed implementation; tests and dev-stub paths use /// to opt out without changing call sites. /// public interface IDriverHealthPublisher { /// /// Publishes a health snapshot for one driver instance. Implementations must be /// non-blocking and tolerant of being called from any thread. /// /// The cluster the driver instance belongs to. /// The driver instance the snapshot describes. /// The current health snapshot. /// The number of errors observed in the trailing 5-minute window. void Publish( string clusterId, string driverInstanceId, DriverHealth health, int errorCount5Min); } /// /// Drop-in no-op for tests and dev-stub paths. Production wires the Akka-backed /// implementation in the Runtime project. /// public sealed class NullDriverHealthPublisher : IDriverHealthPublisher { /// Singleton instance. public static readonly NullDriverHealthPublisher Instance = new(); private NullDriverHealthPublisher() { } /// public void Publish( string clusterId, string driverInstanceId, DriverHealth health, int errorCount5Min) { /* no-op */ } }