JorJika.Api.ServiceRegistry.Consul 1.0.8

Register your api with Consul service registry. Use service discovery, key value store from consul and etc.

Usage =>

In "Startup.cs" file
In "ConfigureServices" Method add following line


//Configuration is ICounfiguration object mapped to json config file where exists consul config section.

In "Configure" Method add "IApplicationLifetime lifetime" as parameter and following line


Example Configuration section for consul (add in your appsettings.json or somwhere else):
 "ConsulConfig": {
   "Address": "",
   "Token": "ConsulACLToken",
   "ApiName": "YourServiceApi",
   "Tags": [ "yourservicetag", "urlprefix-/yourservicetag strip=/yourservicetag" ]

Install-Package JorJika.Api.ServiceRegistry.Consul -Version 1.0.8
dotnet add package JorJika.Api.ServiceRegistry.Consul --version 1.0.8
<PackageReference Include="JorJika.Api.ServiceRegistry.Consul" Version="1.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JorJika.Api.ServiceRegistry.Consul --version 1.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

v1.0.1 => Added possibility to configure HealthCheck custom url, Instance info url and add custom checks as needed.
v1.0.2 => Added Keyword [BASE_URL] in HTTP property of object "AgentServiceCheck". Which will be replaced by binded ip address and port (used to discover local service).
v1.0.3 => Added KV get possibility. Ex: ConsulManager.GetValueByKey("YourFolder/YourKey");
v1.0.4 => Added KVSave. Added async methods;
v1.0.5 => Configuration bug fixed;
v1.0.6 => docker support added in IServerAddressFeature. Replacing "*" with loopback address.;
v1.0.7 => multiple targets added
v1.0.8 => Added Consul Configuration provider. Now its possible to add provider at Program.cs (IConfigurationBuilder.AddConsul). Changed auto discovery code. Replacing * with environment variable _ServerIpAddress if exists, if not then with loopback. Changed namespaces.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.8 86 3/29/2019
1.0.7 151 12/13/2018
1.0.6 129 10/18/2018
1.0.5 127 10/11/2018
1.0.4 131 10/10/2018
1.0.3 137 8/22/2018
1.0.2 142 8/19/2018
1.0.1 160 8/19/2018
1.0.0 156 8/13/2018