Commit Graph

148 Commits (f1fdd55b38f30ad0b8cabf74ce032bc7ca24d3fe)

Author SHA1 Message Date
Kevin Wan 3ede597a15
feat: support customizing timeout for specific route (#1203)
* feat: support customizing timeout for specific route

* test: add more tests
3 years ago
Kevin Wan 91b10bd3b9
feat: add rest.WithPrefix to support route prefix (#1194) 3 years ago
Kevin Wan 7e3fe77e7b
chore: update goctl version to 1.2.3, prepare for release (#1193)
* feat: slow threshold customizable in rest

* chore: update goctl version to 1.2.3, prepare for release
3 years ago
Kevin Wan ba43214dae
feat: slow threshold customizable in zrpc (#1191)
* feat: slow threshold customizable in rest

* feat: slow threshold customizable in rest

* feat: slow threshold customizable in rest

* feat: slow threshold customizable in zrpc
3 years ago
Kevin Wan ebc90720ea
feat: slow threshold customizable in rest (#1189)
* feat: slow threshold customizable in rest

* feat: slow threshold customizable in rest
3 years ago
Kevin Wan 769d06c8ab
refactor: simplify tls config in rest (#1181) 3 years ago
Howie cd1f8da13f
[update] add plugin config (#1180)
Signed-off-by: lihaowei <haoweili35@gmail.com>
3 years ago
Kevin Wan 496a2f341e
test: add more tests (#1163)
* chore: reverse the order of stopping services

* chore: reverse the order of stopping services

* test: add more tests
3 years ago
Kevin Wan 5636bf4955
test: add more tests (#1150) 3 years ago
chenquan 022c100dc9
Add request method in http log (#1120)
* Add request method in http log

* Update log format
3 years ago
Kevin Wan 10e7922597
feat: opentelemetry integration, removed self designed tracing (#1111)
* feat: opentelemetry integration, removed self designed tracing

* feat: support zipkin on opentelemetry integration

* feat: support zipkin on opentelemetry integration, enable it in conf

* style: format code

* fix: support logx without exporter configured

* fix: check return values

* refactor: simplify code

* refactor: simplify opentelemetry integration

* ci: fix staticcheck errors
3 years ago
Kevin Wan ed15ca04f4
fix: opentelemetry traceid not correct (#1108) 3 years ago
Kevin Wan 65905b914d
ci: add reviewdog (#1096) 3 years ago
Kevin Wan 1eb1450c43
downgrade golang-jwt to support go 1.14 (#1073) 3 years ago
Kevin Wan 30e49f2939
fix jwt security issue by using golang-jwt package (#1066) 3 years ago
Kevin Wan 6476da4a18
rest log with context (#998) 3 years ago
Allen Liu 3b683fd498
feat: change logger to traceLogger for getting traceId when recovering (#374) 3 years ago
Kevin Wan 58874779e7
move opentelemetry into trace package, and refactoring (#996)
* move opentelemetry into trace package, and refactoring

* rename rewritten package names
3 years ago
Kevin Wan 9bdadf2381
fix golint issues (#992) 3 years ago
Kevin Wan 407a6cbf9c
format coding style (#983) 3 years ago
Vee Zhang 76fc1ef460
httpx.Error response without body (#982)
* httpx.Error support response without body

* fix doc
3 years ago
Kevin Wan 7618139dad
refactor (#977) 3 years ago
zhoushuguang 280e837c9e
rest otel support (#943) 3 years ago
Kevin Wan f669e1226c
fix #556 (#938) 3 years ago
Kevin Wan 9672298fa8
make sure setting code happen before callback in rest (#936) 3 years ago
Kevin Wan 9c1ee50497
refactor (#920) 3 years ago
chenquan 7c842f22d0
Add traceId to the response headers (#919)
* Add traceId to the request headers

* Add test cases

* Update refactor code
3 years ago
Kevin Wan fc04ad7854
export pathvar for user-defined routers (#911)
* refactor

* export pathvar for user-defined routers
3 years ago
Kevin Wan 54d57c7d4b
refactor rest code (#895) 3 years ago
voidint 28a7c9d38f
fix http header binding failure bug #885 (#887) 3 years ago
fangjianwei b812e74d6f
Fixed http listener error. (#843) 3 years ago
Chen Quan 22a1315136
[WIP]Add parse headers info (#805)
* Add parse headers info

* Update parse headers info
3 years ago
Bo-Yi Wu 73906f996d
chore(format): change by gofumpt tool (#697)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
4 years ago
noel faf4d7e3bb
modify the order of PrometheusHandler (#670)
* modify the order of PrometheusHandler

* modify the order of PrometheusHandler
4 years ago
Kevin Wan 06eeef2cf3
disable prometheus if not configured (#663) 4 years ago
Bo-Yi Wu afd9ff889e
chore: update code format. (#628) 4 years ago
另维64 7e087de6e6
doc: fix spell mistake (#627) 4 years ago
Kevin Wan 3c6951577d
make hijack more stable (#565) 4 years ago
Kevin Wan fcd15c9b17
refactor, and add comments to describe graceful shutdown (#564) 4 years ago
Kevin Wan 1a1a6f5239
add http hijack methods (#555) 4 years ago
Kevin Wan 655ae8034c
fix golint issues in rest (#529) 4 years ago
Kevin Wan ad32f9de23
fix golint issues in core/threading (#524) 4 years ago
hao 2087ac1e89
修正http转发头字段值错误 (#521) 4 years ago
Kevin Wan 395a1db22f
add more tests for rest (#462) 4 years ago
Kevin Wan 03b5fd4a10
fix golint issues (#458) 4 years ago
Kevin Wan 5e969cbef0
fix golint issues, else blocks (#457) 4 years ago
Kevin Wan 42883d0899
fix golint issues, redis methods (#455) 4 years ago
Kevin Wan 54414db91d
fix golint issues, exported doc (#451) 4 years ago
FengZhang a8b550e7ef
Modify the http content-length max range : 30MB --> 32MB (#424)
Because we are programmer :)
4 years ago
FengZhang cbfbebed00
modify the maximum content-length to 30MB (#413) 4 years ago
Kevin Wan e97e1f10db
simplify code with http.Flusher type conversion (#325)
* simplify code with http.Flusher type conversion

* simplify code with http.Flusher type conversion, better version
4 years ago
jichangyun 0bd2a0656c
The ResponseWriters defined in rest.handler add Flush interface. (#318) 4 years ago
Kevin Wan bf21203297
add more tests (#320) 4 years ago
Kevin Wan ae98375194
add more tests (#319) 4 years ago
Kevin Wan 82d1ccf376
fixes #286 (#315) 4 years ago
Kevin Wan 99596a4149
fix issue #266 (#275)
* optimize dockerfile

* fix issue #266
4 years ago
bittoy 88ec89bdbd
optimization (#241) 4 years ago
kevin 9592639cb4 add error handle tests 4 years ago
kevin abcb28e506 support error customization 4 years ago
bittoy 3819f67cf4
add redis geospatial (#209)
* add redis geospatial

* fix go test error
4 years ago
kevin 3806e66cf1 simplify http server starter 4 years ago
kevin bd430baf52 graceful shutdown refined 4 years ago
kevin c9ec22d5f4 add https listen and serve 4 years ago
kevin 4c9315e984 add more tests 4 years ago
kevin 668a7011c4 add more tests 4 years ago
kevin 5e87b33b23 support https in rest 4 years ago
kevin 9c8f31cf83 can only specify one origin in cors 4 years ago
kevin fe0d0687f5 support cors in rest server 4 years ago
kevin 737cd4751a rename NewPatRouter to NewRouter 4 years ago
kingxt aa3c391919
api add middleware support (#140)
* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* update doc

* remove update

* remove no need

* remove no need

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl support import

* goctl support import

* support return ()

* revert

* refactor and rename folder to group

* remove no need

* add anonymous annotation

* optimized

* rename

* rename

* update test

* api add middleware support: usage:

@server(
    middleware: M1, M2
)

* api add middleware support: usage:

@server(
    middleware: M1, M2
)

* simple logic

* should reverse middlewares

* optimized

* optimized

* rename

Co-authored-by: kingxt <dream4kingxt@163.com>
4 years ago
kevin 94645481b1 fix golint issues 4 years ago
kevin 20d53add46 update readme 4 years ago
kevin adc275872d add more tests 4 years ago
kevin b8fcdd5460 add more tests 4 years ago
kevin 9277ad77f7 fix typo of prometheus 4 years ago
kevin a958400595 rename prommetric to prometheous, add unit tests 4 years ago
kevin be9c48da7f add tracing logs in server side and client side 4 years ago
kevin 5e99f2b85d add trace/span in http logs 4 years ago
kevin 86d3de4c89 use package level defined contextKey as context key 4 years ago
kevin 0b1ee79d3a rename rpcx to zrpc 4 years ago
kevin 2b1466e41e add more tests 4 years ago
kevin 9e14820698 fix golint warnings 4 years ago
kevin 054d9b5540 rename rest files 4 years ago
kevin d6c7da521e remove bodyless check 4 years ago
kevin 96b6d2ab58 parse body only if content length > 0 4 years ago
kevin 88a73f1042 return ErrBodylessRequest on get method etc. 4 years ago
kevin 80d55dbc02 export httpx.GetRemoteAddr 4 years ago
kevin b541403ce2 export router 4 years ago
kevin a7c02414f3 export token parser for refresh token service 4 years ago
kevin c57051ce63 use strings.Contains instead of strings.Index 4 years ago
kevin 40895ba8d9 optimize reading http request body 4 years ago
kevin 215b4bae3b check content length before reading 4 years ago
kevin 0a7e0cce77 update package reference 4 years ago
kim 44290aa4d6 refactor 4 years ago
kim cf8e0a118f refactor ngin to rest 4 years ago
kevin b73684d9a6 move router to httpx 4 years ago
kevin f372ded63c rename ngin to rest 4 years ago
kevin 0897f60c5d rename ngin to rest 4 years ago