1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-27 21:49:08 +02:00

161 Commits

Author SHA1 Message Date
jessetang
6330a5688e
chore: replace deprecated method (#2667) 2023-02-21 18:13:03 +08:00
longxboy
bebea0c103
feat: add subset alg for instances (#2613)
* add subset alg for instances

* fix go build

* update go sum

* fix lint

* fix gofmt

* fix lint

* fix polaris

Co-authored-by: caoguoliang01 <caoguoliang01@bilibili.com>
2023-01-13 17:58:09 +08:00
桂后昌
b2689af39c
feat(transport/http): request body read multiple times (#2542)
* fix(transport/http): request body read multiple times

* feat(transport/http): request body read multiple times
2023-01-09 21:21:20 +08:00
180909
e22775cfcc
chore(transport): fix the test name (#2543) 2023-01-09 21:20:49 +08:00
Jesse
54655e4b24
cleanup: use HTTP package methods replace GET POST DELETE... (#2412) 2022-10-18 21:40:16 +08:00
ruohone
d82d607c21
[Feature] add path prefix for http server (#2439)
* update http.NewServer
Add feature:option of mux router prefix path.

* remove nil check in
transport->http->PathPrefix option.

Co-authored-by: luozhihong <luozhihong@risenlighten.com>
2022-10-16 21:30:01 +08:00
包子
8743f3e50c
deps: upgrade kratos version v2.5.1 (#2431)
* deps: upgrade kratos version v2.5.1

* fix goimport
2022-10-10 13:50:04 +08:00
jesse.tang
69fcd50c0a
feat: golangci add goimports local-prefixes (#2413)
* feat: golangci goimports local-prefixes

* fix lint

* fix lint
2022-10-10 11:27:01 +08:00
Tony Chen
a680321309
add custom binding (#2428)
* add custom binding

* fix test

* fix empty value
2022-10-10 10:51:06 +08:00
Tony Chen
468630cc4b
expose request from transport (#2427) 2022-10-09 16:50:09 +08:00
jesse.tang
0e698b248a
cleanup: remove fmt and errors new err (#2377)
* cleanup: remove fmt and errors new err

* fix lint

* fix style

* modify global variable
2022-09-27 14:12:09 +08:00
jesse.tang
4d95050747
fix: fmt import (#2379) 2022-09-27 14:08:08 +08:00
180909
add67beeb3
fix(http/binding): fix http encode url (#2400)
`/api/v1/[name]`
2022-09-24 12:21:58 +08:00
Tony Chen
2d325fd386
fix(http/binding): fix http encode url (#2392)
* fix(http/binding): fix http encode url
2022-09-21 11:31:51 +08:00
jesse.tang
9737a3c5e4
fix: typo and grammatical errors (#2368)
* fix: grammar

* fix: grammar

* fix overrode

* translate to English

* translate to English
2022-09-19 10:39:54 +08:00
jesse.tang
f2a33929d0
fix: modify interface check way (#2375)
* fix: modify interface check way

* fix
2022-09-14 22:05:48 +08:00
Wang-TaoTao
ad7597c0b1
fix: init global selector to wrr (#2323) 2022-08-31 21:42:54 +08:00
pwli
bdfeb4bf78
fix typo (#2284)
Co-authored-by: pwli0755 <lipw0755@gmial.com>
2022-08-17 14:31:54 +08:00
longxboy
11cd43e3c3
refactor: unify selector filter (#2277)
* unify selector

Co-authored-by: caoguoliang01 <caoguoliang01@bilibili.com>
Co-authored-by: chenzhihui <zhihui_chen@foxmail.com>
2022-08-16 21:21:58 +08:00
Kagaya
e4d73db523
fix lint error (#2266) 2022-08-10 17:04:07 +08:00
shifengbin
c407afc81d
fix: in case url or form bind param error should return BadRequest (#2256)
* fix: binding url or form convert type error should be return BadRequest

* golint
2022-08-09 12:00:10 +08:00
Tony Chen
f3b0da3f04
feat(middleware): add selector matcher (#2239)
* feat(middleware): add selector matcher


Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-07-27 13:05:45 +08:00
Tony Chen
d0a0edf67b
feat(http): add http router walk (#2181)
* add http router walk

Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-07-11 19:32:54 +08:00
Ccheers
b3eff576ce
test(transport): add unit test for transport coverage: 91.7% of state… (#2172)
* test(transport): add unit test for transport coverage: 91.7% of statements

* lint & fix data race

* fix test

* fix lint

* fix lint

* remove http func wrapper

* remove error log when watcher context is canceled

* optimize code style
2022-07-10 20:34:19 +08:00
Tony Chen
6ac63e6439
fix(transport): http endpoint listening (#2180)
* fix http serve

* fix endpoint nil

Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-07-10 16:33:52 +08:00
Tony Chen
c90eab4577
fix transport early listening (#2177)
Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-07-10 15:11:18 +08:00
Tony Chen
0bcdb8d59c
fix(encoding/form): encode optional value (#2155)
* fix form encode optional value

* fix test

Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-07-07 22:53:28 +08:00
Tony Chen
a0e624c0b8
fix(binding): fix bind field mask (#2112)
* fix bind field mask


Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-06-19 20:16:58 +08:00
longxboy
123fc1e6c8
feat: add peer for selector (#2088)
* add peer for selector
2022-06-07 22:38:21 +08:00
workman-Lu
d1550b366b
The clear interaction for user (#1916)
Content-type is not be promise from RFC2616 7.2.1.
it may be need a clear describe info:)
2022-06-03 00:33:32 +08:00
虫子樱桃
c6f6caa887
Add Flusher type alias . (#2078)
Co-authored-by: czyt <czyt@w.cn>
2022-06-03 00:24:33 +08:00
haiyux
ad5e9032a3
feat: make secure url to grpcs://127.0.0.1/ (#2072)
* feat:make secure url to grpcs://127.0.0.1/
2022-06-02 19:05:01 +08:00
Tony Chen
1b3529fd0b
transport/http(feat): add redirector to forward request (#2074)
* add redirector to forward request

Co-authored-by: chenzhihui <chenzhihui@bilibili.com>
2022-06-02 18:55:28 +08:00
Tony Chen
dccee86141
log: remove component logger to use global logger (#2061)
* remove component logger to user global logger
2022-05-27 16:29:07 +08:00
Tony Chen
6eae1745bd
http: handle default mux (#2033) 2022-05-23 23:52:25 +08:00
songzhibin97
5e0744a47b
Update encode.go (#2019) 2022-05-21 16:21:36 +08:00
pwli
f0a058713f
fix:(transport/http): fix unexpected overriding behavior when return an error (#1984)
* fix:(transport/http): fix unexpected overriding behavior when return an error

* fix:(transport/http): fix broken tests

Co-authored-by: pwli0755 <lipw0755@gmial.com>
2022-05-19 22:43:53 +08:00
张东龙
60465ccca2
fix(transport/http): responseEncoder should not write any data when it need to write nil (#1945)
* fix(transport/http): responseEncoder should not write any data when it need to write nil

* test(transport/http): adjust the test of response encoder encode nil value

* fix(transport/http): remove content-type setting
2022-04-27 20:16:13 +08:00
张东龙
259cd84653
fix bind test errors (#1950)
* test(transport): fix assertion condition error

* test(transport): it need a unparsed request
2022-04-25 15:10:41 +08:00
李洛克
4472cdbf49
fix client do method done not use when err not nil (#1948) 2022-04-25 15:10:19 +08:00
Tony Chen
d0b704b8f3
feat(selector): add node scheme (#1932)
* add node scheme
2022-04-14 13:48:20 +08:00
Tony Chen
a72fc68ffd
feat: add error cause for statck trace (#1910)
* add error cause for statck trace
2022-04-10 16:15:34 +08:00
包子
558ef4ebae
fix(transport): fix the problem that the context is not delivered correctly (#1906) 2022-04-01 10:52:32 +08:00
Tony Chen
c550a886e9
fix: decode empty body (#1882) 2022-03-17 10:04:48 +08:00
kwanhur
ac99a5c877
style(cmd/errors/examples/middleware/transport): fix common words' spelling mistakes (#1872)
* matchs to matches
* contraint to constraint
* resovle to resolver
* ser to set

Signed-off-by: kwanhur <huang_hua2012@163.com>
2022-03-10 22:42:44 +08:00
haiyux
00c05e82a3
test:remove testify go mod (#1766)
* test:remove testify go mod

* tidy go mdo

* fix test
2022-01-14 10:02:42 +08:00
realityone
0ed2e0f379
feat(log): add global logger appliance, as process level default logger (#1761)
* add global logger appliance, as process level default logger

* replace DefaultLogger as global logger
2022-01-12 15:34:49 +08:00
haiyux
7f003a8742
test(transport): add transport Listener test (#1735)
* test(tansport): add transport Listener test
2021-12-31 11:15:39 +08:00
haiyux
3625634d3c
feat(transport):add grpc and http with listen (#1729)
* feat(transport):add grpc and http with listen
2021-12-30 20:38:22 +08:00
Tony Chen
11a6120a2e
fix FieldMask are converted to/from lower-camel naming conventions. (#1724) 2021-12-28 20:31:23 +08:00