Info
Version: | 1.0.0 |
Author(s): | Authtony |
Last Update: | Tuesday, June 9, 2020 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/Hugehud.RegisterConsul |
Install
Install-Package Hugehud.RegisterConsul
dotnet add package Hugehud.RegisterConsul
paket add Hugehud.RegisterConsul
Hugehud.RegisterConsul Download (Unzip the "nupkg" after downloading)
Dependencies
- Consul(>= 1.6.1.1)
- Microsoft.AspNetCore.Hosting.Server.Abstractions(>= 2.2.0)
- Microsoft.AspNetCore.Http.Abstractions(>= 2.2.0)
- Microsoft.Extensions.Hosting.Abstractions(>= 3.1.4)
- Microsoft.Extensions.Options(>= 3.1.4)
然后在ConfigureServices方法中AddJsonFile加载配置文件,AddHealthChecks添加服务检查,之后在Configure方法添加
app.UseHealthChecks(serviceOptions.Value.HealthCheck);
app.UseConsul(Configuration);.