Browse Source

fix: health check path is changed to 'cap/api/health' (#921)

master
wu 3 years ago
committed by GitHub
parent
commit
470d0e9d26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions
  1. +7
    -7
      src/DotNetCore.CAP.Dashboard/CapCache.cs
  2. +2
    -2
      src/DotNetCore.CAP.Dashboard/NodeDiscovery/INodeDiscoveryProvider.Consul.cs

+ 7
- 7
src/DotNetCore.CAP.Dashboard/CapCache.cs View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@@ -15,7 +15,7 @@ namespace DotNetCore.CAP.Dashboard
/// </summary> /// </summary>
// ReSharper disable once InheritdocConsiderUsage // ReSharper disable once InheritdocConsiderUsage
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
internal class Cache<K, T> : IDisposable
public class Cache<K, T> : IDisposable
{ {
#region Constructor and class members #region Constructor and class members


@@ -121,7 +121,7 @@ namespace DotNetCore.CAP.Dashboard


private void RemoveByTimer(object state) private void RemoveByTimer(object state)
{ {
Remove((K) state);
Remove((K)state);
} }


#endregion #endregion
@@ -251,8 +251,8 @@ namespace DotNetCore.CAP.Dashboard
try try
{ {
var removers = (from k in _cache.Keys.Cast<K>() var removers = (from k in _cache.Keys.Cast<K>()
where keyPattern(k)
select k).ToList();
where keyPattern(k)
select k).ToList();


foreach (var workKey in removers) foreach (var workKey in removers)
{ {
@@ -354,7 +354,7 @@ namespace DotNetCore.CAP.Dashboard
/// instance. /// instance.
/// The <c>.Global</c> member is lazy instanciated. /// The <c>.Global</c> member is lazy instanciated.
/// </summary> /// </summary>
internal class CapCache : Cache<string, object>
public class CapCache : Cache<string, object>
{ {
#region Static Global Cache instance #region Static Global Cache instance


@@ -372,4 +372,4 @@ namespace DotNetCore.CAP.Dashboard
} }


#endregion #endregion
}
}

+ 2
- 2
src/DotNetCore.CAP.Dashboard/NodeDiscovery/INodeDiscoveryProvider.Consul.cs View File

@@ -77,7 +77,7 @@ namespace DotNetCore.CAP.Dashboard.NodeDiscovery
}; };


if (_options.Scheme.Equals("http", StringComparison.OrdinalIgnoreCase)) if (_options.Scheme.Equals("http", StringComparison.OrdinalIgnoreCase))
healthCheck.HTTP = $"http://{_options.CurrentNodeHostName}:{_options.CurrentNodePort}{_options.MatchPath}/health";
healthCheck.HTTP = $"http://{_options.CurrentNodeHostName}:{_options.CurrentNodePort}{_options.MatchPath}/api/health";
else if (_options.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase)) else if (_options.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase))
healthCheck.TCP = $"{_options.CurrentNodeHostName}:{_options.CurrentNodePort}"; healthCheck.TCP = $"{_options.CurrentNodeHostName}:{_options.CurrentNodePort}";


@@ -114,4 +114,4 @@ namespace DotNetCore.CAP.Dashboard.NodeDiscovery
} }
} }
} }
}
}

Loading…
Cancel
Save