Feature/removed consul and its deps to other package (#539)

* #529 removed consul deps and introduced delegate to find service discovery provider

* +semver: breaking moved consul configuration to package..introduced mechanism for packages to configure Ocelot pipeline
This commit is contained in:
Tom Pallister
2018-08-12 17:28:41 +05:30
committed by GitHub
parent a91235b405
commit 87348e5d1b
11 changed files with 58 additions and 92 deletions

View File

@ -121,13 +121,18 @@ At the moment there is no validation at this stage it only happens when Ocelot v
Store configuration in consul
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you add the following when you register your services Ocelot will attempt to store and retrieve its configuration in consul KV store.
The first thing you need to do is install the NuGet package that provides Consul support in Ocelot.
``Install-Package Ocelot.Provider.Consul``
Then you add the following when you register your services Ocelot will attempt to store and retrieve its configuration in consul KV store.
.. code-block:: csharp
services
.AddOcelot()
.AddStoreOcelotConfigurationInConsul();
.AddConsul()
.AddConfigStoredInConsul();
You also need to add the following to your ocelot.json. This is how Ocelot
finds your Consul agent and interacts to load and store the configuration from Consul.