public StitchStateTracker(IStitchHealthNotifier notifier, StitchHealthCalculator calculator) { _notifier = notifier; _calculator = calculator; _stitchLastSyncReceived = new ConcurrentDictionary <string, long>(); _stitchHealth = new ConcurrentDictionary <string, bool>(); }
public StitchHeartbeatService(IModuleLog log, IHeartbeatSender sender, IStitchHealthNotifier notifier, StitchHealthCalculator calculator) { _log = log; _sender = sender; _sequence = new HeartbeatSequence(); _calculator = calculator; _tracker = new StitchStateTracker(notifier, _calculator); }
public StitchMonitorModule(CrossStitchCore core, NodeConfiguration configuration) { _configuration = configuration; var log = new ModuleLog(core.MessageBus, Name); var calculator = new StitchHealthCalculator(configuration.MissedHeartbeatsThreshold); var heartbeatSender = new HeartbeatSender(core.MessageBus); var healthNotifier = new StitchHealthNotifier(core.MessageBus); _heartbeatService = new StitchHeartbeatService(log, heartbeatSender, healthNotifier, calculator); _subscriptions = new SubscriptionCollection(core.MessageBus); }