Commit graph

6 commits

Author SHA1 Message Date
Miek Gieben
8931ede142 core: hide registerHandler ()
* core: hide registerHandler

Remove RegisterHandler and just make it implicit when we look at the
handler compilation step.

* Rename GetHandler to just Handler

Update callers and make auto check Hander in OnStartup.

* Up test coverage in erratic

* up test coverage
2017-08-22 14:21:42 +01:00
Miek Gieben
cc4e4a0626 mw/autopath: integration test with erratic ()
Add integration test with erratic. For this erratic now also returns an
autopath searchpath. This tests the whole chain; i.e registring a
searchfunction and calling that from autopath.

This tests does a autopathing domain and a non-autopathing one.
2017-08-18 12:57:23 +01:00
Miek Gieben
ea77f2a2ca core: replace GetMiddleware ()
* core: replace GetMiddleware

See the discussion in . GetMiddleware would add a `nil` middleware
to the callstack thereby breaking functionality.

This PR drops it in favor of RegisterHandler which is a completely
standalone registry for middleware that want to let it self know to
other middleware.

Currenly *autopath* uses this to call *kubernetes*'s AutoPath method
for dynamic autopathing.

* Drop GetMiddleware

* Register metrics

* drop the panic
2017-08-10 21:31:36 +01:00
Miek Gieben
4d0dae8deb middleware/autopath: some fixes ()
* middleware/autopath: some fixes

This fix a small issue in autopath, but unearthed a bigger one.
See .

* Fix test
2017-08-10 19:27:54 +01:00
Miek Gieben
b8e2c476a5 mw/authpath: hook in kubernetees ()
Call out to kubernetes to get the search path - this still needs
to return something sensible, but all infrastructure has landed
to make it work.
2017-08-09 04:06:48 -07:00
Miek Gieben
b46b9880bd WIP: autopath as middleware ()
autopath as middleware
2017-08-09 03:13:38 -07:00