Feature/inject error mapper (#562)

* added delegate to select last handler

* #529 implemented a way we can inject the last delegating handler

* wip - moving code

* #529 removed loads of qos code and moved it into Ocelot.Provider.Polly

* #529 can now inject http client expcetions to ocelot errors mappers and updated docs
This commit is contained in:
Tom Pallister
2018-08-19 12:57:43 +01:00
committed by GitHub
parent 98ba0271be
commit 6d8b18c01d
13 changed files with 177 additions and 317 deletions

View File

@ -5,7 +5,22 @@ Ocelot supports one QoS capability at the current time. You can set on a per ReR
want to use a circuit breaker when making requests to a downstream service. This uses the an awesome
.NET library called Polly check them out `here <https://github.com/App-vNext/Polly>`_.
Add the following section to a ReRoute configuration.
The first thing you need to do if you want to use the administration API is bring in the relavent NuGet package..
``Install-Package Ocelot.Provider.Polly``
Then in your ConfigureServices method
.. code-block:: csharp
public virtual void ConfigureServices(IServiceCollection services)
{
services
.AddOcelot()
.AddPolly();
}
Then add the following section to a ReRoute configuration.
.. code-block:: json