mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 07:08:14 +08:00
hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig * some renaming and refactoring * more renames * hacked away the old config json * test for issue 213 * renamed key * dont share ports * oops * updated docs * mvoed docs around * port being used
This commit is contained in:
@ -1,29 +1,29 @@
|
||||
using CacheManager.Core;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.AcceptanceTests.Caching;
|
||||
|
||||
namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
public class StartupWithConsulAndCustomCacheHandle : AcceptanceTestsStartup
|
||||
{
|
||||
public StartupWithConsulAndCustomCacheHandle(IHostingEnvironment env) : base(env) { }
|
||||
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddOcelot(Configuration)
|
||||
.AddCacheManager((x) =>
|
||||
{
|
||||
x.WithMicrosoftLogging(log =>
|
||||
{
|
||||
log.AddConsole(LogLevel.Debug);
|
||||
})
|
||||
.WithJsonSerializer()
|
||||
.WithHandle(typeof(InMemoryJsonHandle<>));
|
||||
})
|
||||
.AddStoreOcelotConfigurationInConsul();
|
||||
}
|
||||
}
|
||||
}
|
||||
using CacheManager.Core;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Ocelot.DependencyInjection;
|
||||
using Ocelot.AcceptanceTests.Caching;
|
||||
|
||||
namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
public class StartupWithConsulAndCustomCacheHandle : AcceptanceTestsStartup
|
||||
{
|
||||
public StartupWithConsulAndCustomCacheHandle(IHostingEnvironment env) : base(env) { }
|
||||
|
||||
public override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddOcelot(Configuration)
|
||||
.AddCacheManager((x) =>
|
||||
{
|
||||
x.WithMicrosoftLogging(log =>
|
||||
{
|
||||
log.AddConsole(LogLevel.Debug);
|
||||
})
|
||||
.WithJsonSerializer()
|
||||
.WithHandle(typeof(InMemoryJsonHandle<>));
|
||||
})
|
||||
.AddStoreOcelotConfigurationInConsul();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user