20 Commits

Author SHA1 Message Date
Tom Pallister
fe3e8bd23a
Remove Ocelot specific Middleware to make Ocelot more compatible with kestrel middleware and get ready for YARP 2020-05-23 15:48:51 +01:00
TomPallister
2772ce406d all acceptance tests passing 2020-02-19 09:18:01 +00:00
Thiago Loureiro
5d82e68534
Removed unused usings, removed empty spaces, removed tons os warnings (#903) 2019-05-28 11:00:54 +08:00
Tom Pallister
b854ca63ce
use a stream rather than byte array in responder (#519) 2018-07-31 19:21:12 +01:00
Tom Pallister
1e2e953b2c
Feature/automatic routes with sd (#351)
* #340 started looking at supporting automatic routing when using service discovery

* #340 getting old routing tests to pass

* #340 renamed stuff to provider rather than finder, as its not longer finding anything

* #340 working towards supporting dynamic routing

* #340 loads of refactoring to make configuration work with dynamic routing

* #340 refactor consul config code so the registry class owns it

* #340 default to consul to maintain backwards compat

* #340 added docs, finished this branches todos
2018-05-14 21:26:10 +01:00
Tom Pallister
aa55fe34cb
Feature/merge configuration files (#316)
* #296 renamed configuration.json to ocelot.json in preparation

* removed things we dont need for tests

* another file we dont need

* removed some async we dont need

* refactoring to consolidate configuration code

* removed another pointless abstraction

* #296 started writing merge code

* #296 coming up with ideas for this config merging

* #296 still hacking this idea around

* #296 will now do a crappy merge on the configuration

* #296 change so tests pass on windows
2018-04-17 22:06:41 +01:00
Tom Pallister
efbb950ea2
Feature/another look at logging (#303)
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* changing logging levels and logging like ms reccomends with structured data rather than strings

* more faffing

* more fafin

* #287 ocelot logger now only takes strings as it did take params then just turned them to strings, misleading, unit tests for logger and diagnosticlogger

* #287 errors now logged as they happen

* #287 more detail for logs requested in issue

* #287 tidy up

* #287 renamed

* #287 always log context id

* #287 fixed me being an idiot

* #287 removed crap websockets unit test that isnt a unit test

* #287 removed crap websockets unit test that isnt a unit test
2018-04-07 12:03:24 +01:00
Philip Wood
167fbb3daf Remove multiple concurrent blank lines
SA1507
2018-03-03 13:26:27 +00:00
Philip Wood
c61dc9fd11 Fix brace line spacing and remove multiple concurrent whitespace characters
SA1025, SA1505, SA1508, SA-1509, SA1513
2018-03-03 13:14:24 +00:00
Tom Pallister
d1926268ac
Feature/downstream aggregation (#248)
* started messing around with this on the train last night

* mega hacking away to change middleware into Ocelot iddleware

* scoped data repo back in

* broken commit getting tests working

* another broken commit farting around with tests

* all unit tests passing again

* mw pipeline for ocelot...still loads of hacks but getting there now to get acceptance tests working, then fix config so you can have aggregate and then imlement multiplexer, then mapping to response...loads to do

* all tests passing before aggregation feature implemented

* removed all the request middleware stuff we dont need it

* updated how errors work...tho i think there could be edge case here when aggregating because one downstream could error and this would effect another

* removed multiplexer so you dont have to send route down, this isnt very thread safe...sigh

* hacking around getting the config for aggregates in, this might change

* refactored builder and unit tests passing now

* Updated a bunch of ports for tests

* plugged in code to create reroutes that are aggregates

* made multiplexer a class

* hacked test to death

* simple aggregator done, initial validation done

* removed request id from context, it is still specific for http request

* now aggregates to json always

* docs for aggregate reroutes

* Updated docs
2018-02-27 08:22:47 +00:00
Tom Pallister
05481f3af3
Feature/use any id server for admin area (#232)
* initial commits around using any id servers

* add your own id server for admin area

* lots of refactoring, now instead of injecting IWebHostBuilder we just set the Ocelot base url as a configuration extension method..this means people can pass it in on the command line aswell as hardcode which is OK I guess, also can now use your own IdentityServer to authenticate admin area

* updated docs for #231

* some tests that hopefully bump up coverage
2018-02-14 18:53:18 +00:00
Tom Pallister
3ac9b3bd87
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
2018-01-31 20:34:55 +00:00
Tom Pallister
6a20baeb97
Improving logging and request id (#189)
* hacking around to work out why logging and request id isnt working

* pass request id into logger so it can be structured, removed a bunch of debug logging we dont need because diagnostic trace gets it

* changed config dependency

* always have tracing available

* made it so we dont need to pass config into services.AddOcelot anymore with .net core 2.0

* add test

* lots of changes relating to logging and request ids, also updated documentation

* fixed failing test i missed
2018-01-06 16:39:05 +00:00
Tom Pallister
3b27bb376e
Feature/fix #156 (#160)
* change config creator to not throw exception in there is an error......lord i hate this config creator code I need to sort it out.

* Remove method that we are not using anymore..

* throw exception and add errors to message

* train hacking and some refactoring

* bs test for code coverage

* actually return the errors in the exception
2017-11-24 21:10:03 +00:00
Philip Wood
de5ae05bd6 Refactor ExceptionHandlerMiddleware tests to use base class. 2017-07-18 11:57:48 +01:00
Philip Wood
c70a90f415 Fix more test-related build warnings 2017-07-18 10:20:59 +01:00
Philip Wood
8042bbab2c Moved common middleare test setup into a base class 2017-07-18 09:28:32 +01:00
Tom Gardham-Pallister
e96d66139f boost test coverage 2017-06-24 13:04:25 +01:00
TomPallister
47afc850ff Added some basic cache stuff 2016-11-04 15:05:59 +00:00
TomPallister
56bf4014bd Added request id functionality and general refactoring..also turned out i wasnt returning headers....sigh 2016-10-30 17:29:37 +00:00