Refactor qos as options

This commit is contained in:
geffzhang
2017-02-08 09:25:32 +08:00
parent 616ca4f730
commit caae826d77
29 changed files with 408 additions and 422 deletions

View File

@ -125,9 +125,6 @@ namespace Ocelot.AcceptanceTests
DownstreamScheme = _downstreamServiceScheme,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>(),
@ -168,9 +165,7 @@ namespace Ocelot.AcceptanceTests
DownstreamScheme = _downstreamServiceScheme,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Post",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>(),
@ -211,10 +206,7 @@ namespace Ocelot.AcceptanceTests
DownstreamScheme = _downstreamServiceScheme,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Post",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>(),
Provider = "IdentityServer",

View File

@ -43,9 +43,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>(),

View File

@ -37,9 +37,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
FileCacheOptions = new FileCacheOptions
{
TtlSeconds = 100
@ -76,9 +73,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
FileCacheOptions = new FileCacheOptions
{
TtlSeconds = 1

View File

@ -36,9 +36,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000
}
}
};
@ -67,9 +64,6 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
ReRouteIsCaseSensitive = false,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -98,9 +92,6 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
ReRouteIsCaseSensitive = true,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000
}
}
};
@ -129,9 +120,6 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/PRODUCTS/{productId}",
UpstreamHttpMethod = "Get",
ReRouteIsCaseSensitive = true,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -160,9 +148,6 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
ReRouteIsCaseSensitive = true,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -191,9 +176,6 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/PRODUCTS/{productId}",
UpstreamHttpMethod = "Get",
ReRouteIsCaseSensitive = true,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000
}
}
};

View File

@ -57,9 +57,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>

View File

@ -57,9 +57,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
AuthenticationOptions = new FileAuthenticationOptions
{
AdditionalScopes = new List<string>

View File

@ -51,9 +51,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -91,9 +88,7 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -131,9 +126,7 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -171,9 +164,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -211,9 +201,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -251,9 +238,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};

View File

@ -40,10 +40,7 @@ namespace Ocelot.AcceptanceTests
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
RequestIdKey = _steps.RequestIdKey,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
}
};
@ -70,10 +67,7 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
RequestIdKey = _steps.RequestIdKey,
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -101,11 +95,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
DownstreamScheme = "http",
DownstreamHost = "localhost",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
UpstreamTemplate = "/",
}
},
GlobalConfiguration = new FileGlobalConfiguration

View File

@ -46,9 +46,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -77,9 +75,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -108,9 +104,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -139,9 +133,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/products/",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -170,9 +162,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/products",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -201,9 +191,11 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
QoSOptions = new FileQoSOptions()
{
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
TimeoutValue = 5000 }
}
}
};
@ -231,9 +223,6 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
UpstreamTemplate = "/products/{productId}",
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};
@ -261,10 +250,7 @@ namespace Ocelot.AcceptanceTests
DownstreamPort = 51879,
DownstreamScheme = "http",
UpstreamTemplate = "/",
UpstreamHttpMethod = "Post",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
UpstreamHttpMethod = "Post",
}
}
};
@ -293,9 +279,6 @@ namespace Ocelot.AcceptanceTests
DownstreamHost = "localhost",
DownstreamPort = 51879,
UpstreamHttpMethod = "Get",
ExceptionsAllowedBeforeBreaking = 3,
DurationOfBreak =5,
TimeoutValue = 5000,
}
}
};

View File

@ -1 +1 @@
{"ReRoutes":[{"DownstreamPathTemplate":"41879/","UpstreamTemplate":"/","UpstreamHttpMethod":"Get","AuthenticationOptions":{"Provider":null,"ProviderRootUrl":null,"ScopeName":null,"RequireHttps":false,"AdditionalScopes":[],"ScopeSecret":null},"AddHeadersToRequest":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0},"ReRouteIsCaseSensitive":false,"ServiceName":null,"DownstreamScheme":"http","DownstreamHost":"localhost","DownstreamPort":41879,"ExceptionsAllowedBeforeBreaking":3,"DurationOfBreak":5,"TimeoutValue":5000,"LoadBalancer":null}],"GlobalConfiguration":{"RequestIdKey":null,"ServiceDiscoveryProvider":{"Provider":null,"Host":null,"Port":0}}}
{"ReRoutes":[{"DownstreamPathTemplate":"41879/","UpstreamTemplate":"/","UpstreamHttpMethod":"Get","AuthenticationOptions":{"Provider":null,"ProviderRootUrl":null,"ScopeName":null,"RequireHttps":false,"AdditionalScopes":[],"ScopeSecret":null},"AddHeadersToRequest":{},"AddClaimsToRequest":{},"RouteClaimsRequirement":{},"AddQueriesToRequest":{},"RequestIdKey":null,"FileCacheOptions":{"TtlSeconds":0},"ReRouteIsCaseSensitive":false,"ServiceName":null,"DownstreamScheme":"http","DownstreamHost":"localhost","DownstreamPort":41879,"QoSOptions":{"ExceptionsAllowedBeforeBreaking":0,"DurationOfBreak":0,"TimeoutValue":0},"LoadBalancer":null}],"GlobalConfiguration":{"RequestIdKey":null,"ServiceDiscoveryProvider":{"Provider":null,"Host":null,"Port":0}}}