Commit Graph

81 Commits

Author SHA1 Message Date
Umputun
680d988d42 change url value in final proxy to const usage 2021-06-01 04:00:38 -05:00
Umputun
56cd1205a1 clean usage of plugin context in proxy 2021-06-01 03:59:23 -05:00
Umputun
b3d222a60a quick and dirty fix for assets rules regression 2021-06-01 03:50:20 -05:00
Umputun
0b3e1d9062 warn logging on destination parser 2021-06-01 03:34:50 -05:00
Umputun
3efcd15747 add warns on static path issues 2021-06-01 03:25:35 -05:00
Umputun
7139c57766
RPC plugins support (#85)
* wip

* resolve merge artifacts

* full coverage for conductor

* wire plugin conductor to main and proxy

* wip, with separate match handler

* split matching logic with another handler, add initial docs

* move parts of proxy to handlers, add tests

* add headers in to be sent to proxied url

* merged from master

* add example with docker compose

* supress excesive debug reporting 0-9 disabled in docker

* add plugin tests

* randomize test port

* lint: minor warns

* lint: err shadow
2021-06-01 02:56:39 -05:00
Umputun
282b4b268c add lb selector 2021-05-28 16:11:16 -05:00
Umputun
971e77b5d3 eliminate metrics middleware hit if mgmt disabled 2021-05-22 10:44:21 -05:00
Umputun
095f4d7102
Multi match (#74)
* discovery support for multiple matches

* switch proxy matcher usage, add random selection

* fix multi-match logic

* pass match picker func

* simplify rand picker

* update health params and docs

* fix early termination on discovery multi-match

* add grouping of sorted matches in sorted result

* add mention of live check to readme
2021-05-16 18:34:51 -05:00
nikolay.bystritskiy
bfe5f3fdbf fix ticker, variable names and unnecessary if in Service.Match 2021-05-16 14:17:50 -05:00
nikolay.bystritskiy
49515e307c update health state not sorting or reordering mappers 2021-05-16 14:17:50 -05:00
nikolay.bystritskiy
973d6c9a14 add automatic health-checker 2021-05-16 14:17:50 -05:00
Umputun
f6f26a4807 add log for enabled options 2021-05-14 22:14:49 -05:00
Umputun
aee7e8a57e revert to stable go-pgz/rest, switch size limiter to local implementation #71 2021-05-14 16:17:52 -05:00
Umputun
137cf692c4 switch to master go-pkgz/rest #71 2021-05-14 13:47:44 -05:00
Umputun
a93bd40f8a treat 0 max request size limit as unlimited 2021-05-12 21:54:41 -05:00
Umputun
25ee73d8d6 set X-Forwarded-Host to orid host, drop X-Origin-Host #67 2021-05-10 03:50:00 -05:00
Umputun
a73a16c12b wait till fqdn avail for ssl auto #63 2021-05-05 01:41:23 -05:00
Umputun
211fe15b8f add autocert details log 2021-05-04 12:51:07 -05:00
Umputun
3eba72cbff extend health chek to make sure all pings called 2021-05-02 12:52:29 -05:00
Umputun
5743109210
Nice error (#61)
* add support of html error reporting with custom templates

* typo

* formatting

* better template load error msg
2021-04-30 04:03:36 -05:00
Umputun
06e78b81d4 extend no match WARN 2021-04-28 14:47:53 -05:00
Umputun
1ff45cc2ca add integration test over https 2021-04-27 02:50:45 -05:00
Umputun
604391e55e extend tests for tricky cases 2021-04-27 01:57:04 -05:00
Umputun
66eb3ffe4a support d units in cache duration 2021-04-27 01:40:46 -05:00
Umputun
a4cffbe922
Mime cache (#59)
* support different caching duration for different mime types #58

* extract main code to run func

* lint: err shadowing
2021-04-26 18:51:48 -05:00
Umputun
9a7a92fc41 make deadlock test on health handler more realistic 2021-04-24 04:03:29 -05:00
Umputun
c590c3246d
Assets cache (#54)
* add caching control for assets
* regen site
2021-04-23 02:02:36 -05:00
Nikita Vasiliev
ef8298bb9c Test to catch a deadlock in healthHandler() 2021-04-21 17:30:34 -05:00
Nikita Vasiliev
38af32f37c Fix a deadlock 2021-04-21 17:30:34 -05:00
Umputun
f16d92b774 lint: minor warns 2021-04-20 19:22:46 -05:00
Umputun
aef3040b60 fix tests regression 2021-04-20 19:22:46 -05:00
Umputun
8ea0052228 implement basic support of metrics via mgmt server #35 2021-04-20 19:22:46 -05:00
Umputun
f7b24e1058 fix health counts calculation 2021-04-17 23:41:44 -05:00
Umputun
1695532aa5 add ping test 2021-04-17 23:32:54 -05:00
Umputun
f246618622 don't health check asset mappers 2021-04-17 23:28:12 -05:00
Umputun
afbcc6c7bb removed unneded atomic in health check 2021-04-17 23:24:41 -05:00
Umputun
f304a2f0e6 add total number of services to health error 2021-04-17 23:06:48 -05:00
Umputun
bbbd24dd53 fix missing url.Host forward 2021-04-17 13:11:10 -05:00
Umputun
ee4f8919e1 allow docker to provide static with proxy at the same time #27 2021-04-17 02:17:23 -05:00
Umputun
8cf4b9063d
Multiple static location (#36)
* add isStatic flag to mapper, implement for file and static providers

* handle static match response as a special case

* move assets conversion to load time

* rename static to assets everywhere for consistency

* don't overwride asset param in url mapper

* add documentation about assets mode

* add tests
2021-04-16 02:49:00 -05:00
Vladimir Garvardt
66610ef491 Replaced github.com/pkg/errors with stdlib errors wrap 2021-04-14 11:44:20 -05:00
Konstantin Alikhanov
c5200e0a1a Fixing type error in SSL Static mode 2021-04-14 11:08:17 -05:00
Umputun
1606e56d82 fix proxy headers, should affect response not the request 2021-04-13 14:33:54 -05:00
Umputun
6dcc2fa719 flip signature, disabled by default 2021-04-13 14:08:15 -05:00
Umputun
510b29c3ec wrap proxy internal err log 2021-04-13 14:03:25 -05:00
Umputun
9bcb9de0d4 filter /ping from stdout logging 2021-04-13 13:04:40 -05:00
Umputun
d8309ab6f2 allow optional stdout logging 2021-04-13 12:45:49 -05:00
Umputun
5479063f4e limit health check concurrency 2021-04-13 12:34:34 -05:00
Umputun
af02a41147 add primitive priority order for discovered containers 2021-04-13 01:52:12 -05:00