From 0f500ecf4c326aca2b40cc5bcfdc48f9911ca997 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 7 Aug 2021 16:37:05 +0530 Subject: [PATCH] HealthMonitoringService: added healthCheckUrl parameter support. --- Apps/FailoverApp/HealthMonitoringService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Apps/FailoverApp/HealthMonitoringService.cs b/Apps/FailoverApp/HealthMonitoringService.cs index 195b6b3a..8fd01da3 100644 --- a/Apps/FailoverApp/HealthMonitoringService.cs +++ b/Apps/FailoverApp/HealthMonitoringService.cs @@ -348,15 +348,15 @@ namespace Failover #region public - public HealthCheckStatus QueryStatus(IPAddress address, string healthCheck, bool tryAdd) + public HealthCheckStatus QueryStatus(IPAddress address, string healthCheck, Uri healthCheckUrl, bool tryAdd) { if (_addressMonitoring.TryGetValue(address, out AddressMonitoring monitoring)) { - return monitoring.QueryStatus(healthCheck); + return monitoring.QueryStatus(healthCheck, healthCheckUrl); } else if (tryAdd) { - monitoring = new AddressMonitoring(this, address, healthCheck); + monitoring = new AddressMonitoring(this, address, healthCheck, healthCheckUrl); if (!_addressMonitoring.TryAdd(address, monitoring)) monitoring.Dispose(); //failed to add first @@ -365,7 +365,7 @@ namespace Failover return null; } - public HealthCheckStatus QueryStatus(string domain, DnsResourceRecordType type, string healthCheck, bool tryAdd) + public HealthCheckStatus QueryStatus(string domain, DnsResourceRecordType type, string healthCheck, Uri healthCheckUrl, bool tryAdd) { domain = domain.ToLower(); @@ -375,11 +375,11 @@ namespace Failover { if (_domainMonitoringA.TryGetValue(domain, out DomainMonitoring monitoring)) { - return monitoring.QueryStatus(healthCheck); + return monitoring.QueryStatus(healthCheck, healthCheckUrl); } else if (tryAdd) { - monitoring = new DomainMonitoring(this, domain, type, healthCheck); + monitoring = new DomainMonitoring(this, domain, type, healthCheck, healthCheckUrl); if (!_domainMonitoringA.TryAdd(domain, monitoring)) monitoring.Dispose(); //failed to add first @@ -391,11 +391,11 @@ namespace Failover { if (_domainMonitoringAAAA.TryGetValue(domain, out DomainMonitoring monitoring)) { - return monitoring.QueryStatus(healthCheck); + return monitoring.QueryStatus(healthCheck, healthCheckUrl); } else if (tryAdd) { - monitoring = new DomainMonitoring(this, domain, type, healthCheck); + monitoring = new DomainMonitoring(this, domain, type, healthCheck, healthCheckUrl); if (!_domainMonitoringAAAA.TryAdd(domain, monitoring)) monitoring.Dispose(); //failed to add first