MSHelper.Discovery.Consul
1.0.0
dotnet add package MSHelper.Discovery.Consul --version 1.0.0
NuGet\Install-Package MSHelper.Discovery.Consul -Version 1.0.0
<PackageReference Include="MSHelper.Discovery.Consul" Version="1.0.0" />
paket add MSHelper.Discovery.Consul --version 1.0.0
#r "nuget: MSHelper.Discovery.Consul, 1.0.0"
// Install MSHelper.Discovery.Consul as a Cake Addin #addin nuget:?package=MSHelper.Discovery.Consul&version=1.0.0 // Install MSHelper.Discovery.Consul as a Cake Tool #tool nuget:?package=MSHelper.Discovery.Consul&version=1.0.0
MSHelper.Discovery.Consul : Service Discovery
⭐ Star us on GitHub � it motivates us a lot!
Overview
Provides ConsulServiceDiscoveryMessageHandle
r (used by IHttpClient
) that integrates with Consul service discovery mechanism.
Installation
This document is for the latest MSHelper.Discovery.Consul 1.0.0 release and later.
dotnet add package MSHelper.Discovery.Consul
Dependencies
-- MSHelper
Usage
Extend IMSHelperBuilder
with AddConsul()
that will register the required services.
public static IMSHelperBuilder RegisterMSHelper(this IMSHelperBuilder builder)
{
builder
.AddHttpClient()
.AddConsul();
// Other services.
return builder;
}
Options
--- enabled - determines whether Consul integration is going to be available.
--- url - URL of the Consul service.
--- service - name of the service group (multiple instances of the same service will use the same service name).
--- address - address of the service.
--- port - port under which the service is available.
--- pingEnabled - register health checks from Consul to validate the service availability (if the service will be offline, it will be removed after the pingInterval and removeAfterInterval timeouts).
--- pingEndpoint - an endpoint that should be called when performing the healt check by Consul.
appsettings.json
"consul": {
"enabled": true,
"url": "http://localhost:8500",
"service": "some-service",
"address": "localhost",
"port": "5000",
"pingEnabled": true,
"pingEndpoint": "ping",
"pingInterval": 3,
"removeAfterInterval": 3
}
Important Note:
All the MSHelper packages are for self learning purposes inspired by Devmentors.io
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.0)
- MSHelper (>= 1.0.0)
- MSHelper.HTTP (>= 1.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MSHelper.Discovery.Consul:
Package | Downloads |
---|---|
MSHelper.LoadBalancing.Fabio
MSHelper.LoadBalancing.Fabio - integrates with Fabio load balancer |
|
MSHelper.HTTP.RestEase
MSHelper.HTTP.RestEase - RestEase Integration |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 300 | 10/25/2022 |