Пример #1
0
 public HeartbeatAlerter(IOptionsMonitor <HeartbeatAlerterOptions> options, HeartbeatTracker tracker, IEnumerable <IHeartbeatAlerter> alerters, HeartbeatLog heartbeatLog)
 {
     this.tracker      = tracker;
     this.options      = options;
     this.alerters     = alerters;
     this.heartbeatLog = heartbeatLog;
     this.options.OnChange(OnOptionsChanged);
 }
Пример #2
0
        public HelloWorld(HeartbeatTracker tracker, HeartbeatLog heartbeatLog)
        {
            this.tracker      = tracker;
            this.heartbeatLog = heartbeatLog;

            _timer = new Timer(state =>
            {
                Changed(nameof(ServerTime));
                Changed(nameof(HealthyHeartbeatCount));
                Changed(nameof(LogItems));
                PushUpdates();
            }, null, 0, 1000);
        }
Пример #3
0
 public HeartbeatTracker(IOptionsMonitor <HeartbeatTrackerOptions> options, HeartbeatLog heartbeatLog)
 {
     this.options      = options;
     this.heartbeatLog = heartbeatLog;
 }