1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-10-30 23:47:59 +02:00

1983 Commits

Author SHA1 Message Date
HoronLee
cdff247090 feat(consul): support custom tags for service registration (#3707) 2025-10-15 10:09:53 +08:00
包子
25b6c0fb9f deps: retract v2.9.0 (#3723) v2.9.1 2025-09-12 18:40:10 +08:00
包子
a7fba153b8 Revert "perf(transport/http): optimize URL construction with url.URL for bett…" (#3722) 2025-09-12 18:33:08 +08:00
qingbozhang
20de382718 fix(transport/http): resolve breaking change with ResponseTransporter interface (#3721) 2025-09-12 18:31:01 +08:00
包子
593b412234 deps: upgrade kratos version to v2.9.0 (#3717) v2.9.0 2025-09-10 20:42:01 +08:00
Name
3e3318a458 perf(transport/http): optimize URL construction with url.URL for better performance (#3678)
Co-authored-by: huangzw <huangzw@2345.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-09-04 21:34:08 +08:00
Name
9f854e6981 perf(transport/http/binding): optimize EncodeURL performance for paths without placeholders (#3679)
Co-authored-by: huangzw <huangzw@2345.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-09-04 21:27:26 +08:00
Nathan Baulch
afc564b376 fix(encoding): extract all form fields even if some unsupported (#3694)
* rename `simples` test data field to `strings`

* failing unit test

* fix: extract all form fields even if some fail

---------

Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-09-04 21:19:32 +08:00
Tony.Chen
4889c317a3 fix meta variable (#3712) 2025-09-04 21:13:07 +08:00
Name
4a1ed45fa6 refactor(all): replace atomic functions with atomic types (#3699)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-09-04 20:42:51 +08:00
cui
3c0775892e contrib/register/nacos: refactor to use maps.Clone (#3703)
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-09-04 20:40:02 +08:00
Nathan Baulch
41c1f06456 feat(protoc-gen-go-http): mark deprecated methods in generated code (#3711)
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-09-04 20:39:17 +08:00
HoronLee
3a1b607eb5 deps(middleware): upgrade protovalidate to resolve compatibility issue (#3706) 2025-09-04 20:34:59 +08:00
Nathan Baulch
5bcf5bbe27 fix: honor shutdown timeout when provided context already canceled (#3695) 2025-09-03 10:53:06 +08:00
Windfarer
2c5e98d294 chore: add deepwiki badge (#3701) 2025-09-03 10:49:34 +08:00
Abhishek koserwal
308cfee50a fix stale entries before the each pick operation (#3690)
* fix stale entries before the each pick operation

* Update selector/wrr/wrr.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update selector/wrr/wrr_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix lint issue and optimize for new map creation

* fixing lint issue

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-28 21:30:12 +08:00
Name
f7f150c3f1 fix: replace strconv.Itoa with strconv.FormatInt for int64 handling (#3667)
Co-authored-by: huangzw <huangzw@2345.com>
2025-07-31 16:40:34 +08:00
Weizhen Wang
4b104e99c9 *: use net.JoinHostPort to improve IPv6 compatible (#3675)
* *: use net.JoinHostPort to improve IPv6 compatible

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* *: use net.JoinHostPort to improve IPv6 compatible

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* update

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* update

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

---------

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2025-07-31 16:39:37 +08:00
Name
ac92cbe570 perf(config/env): use strings.LastIndexByte instead of strings.LastIndex (#3660)
* perf(config/env): use strings.LastIndexByte instead of strings.LastIndex

* test(config/env): add test cases for TestFormat

* test(config/file): add benchmark test for format function

---------

Co-authored-by: huangzw <huangzw@2345.com>
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-07-15 23:02:40 -07:00
Monet Lee
0bf7c1ad32 fix: solve have syntax error when execute make command. (#3682)
* fix: solve have syntax error when excute make command.

* update contents.

* remove incorrect contents.
2025-07-14 22:44:25 +08:00
Tony.Chen
fbbe2f5cc3 Add trendshift badge (#3655) 2025-07-14 22:44:07 +08:00
Name
d6f5f00cf5 perf(metadata): simplify Metadata.Add by avoiding redundant strings.ToLower call (#3671) 2025-05-27 23:29:16 +08:00
Tony.Chen
c82f795722 Mcp options (#3652)
* Add MCP Options
2025-04-29 15:46:18 +08:00
Name
b463dc5147 Revert "refactor: replace repeated error reasons with constants (#3612)" (#3651)
This reverts commit 5617ff3ff7.

Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-27 11:06:26 +08:00
jc
1baa3c6f49 fix(internal/host): Extract optimizes the return of the minimum index IP (#3421)
* fix(internal/host): Extract optimizes the return of the minimum index IP


---------

Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-27 11:00:03 +08:00
hengyumo
38499aa95d fix: Fixed zookeeper watcher exiting the loop under exceptional conditions, causing service discovery to terminate (#3517)
Co-authored-by: 199811 <199811@nd.com.cn>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-27 10:59:41 +08:00
Name
ff2d73a882 perf(config/env): use strings.Cut to optimize env load method (#3645)
* perf(config/env): use strings.Cut and pre-allocate slice to optimize env load

* refactor(config/env): load returns nil when no kv found

---------

Co-authored-by: 1911860538 <alxps1911@gmail.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-25 13:47:16 +08:00
Tony.Chen
db4961c254 add mcp middleware (#3649)
* add mcp middleware

* add health middleware
2025-04-25 13:46:42 +08:00
Xudong Cai
15dd2f638e refactor(contrib/registry/etcd): use Namespace Name and ID as the unique keys (#3594)
The service.ID cannot be unique. You are advised to use Namespace Name and ID as the unique keys

Co-authored-by: Windfarer <windfarer@gmail.com>
2025-04-25 10:10:12 +08:00
Weizhen Wang
b0dcdf139c go mod tidy (#3648)
* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

* go mod tidy

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>

---------

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
2025-04-24 19:34:40 +08:00
dependabot[bot]
48974ef77a build(deps): bump golang.org/x/net from 0.23.0 to 0.33.0 (#3527)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 包子 <baozhecheng@foxmail.com>
2025-04-24 18:18:53 +08:00
Tony.Chen
4becc96126 feat: add MCP transport (#3646)
* Add MCP Transport

* add readme

* Update README.md

* fix lint

* Update README.md
2025-04-24 18:07:12 +08:00
Tony.Chen
dbd7664eff github: Remove submodule dependencies in Dependabot. (#3643)
* Remove submodule dependencies in Dependabot.

* Update the Go versions in the workflow.

* golangci-lint migrates to v2.
2025-04-23 19:57:21 +08:00
Name
219274437f perf(encoding/form): optimize camelCase and snakeCase conversion (#3592)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-23 18:38:23 +08:00
Name
b675bfe20c refactor: extract key for reuse and maintainability (#3602)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-23 18:10:43 +08:00
Name
a0a243dbd3 perf(config/file): optimize file format func (#3610)
Co-authored-by: huangzw <huangzw@2345.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-23 18:07:59 +08:00
Name
5617ff3ff7 refactor: replace repeated error reasons with constants (#3612)
* refactor: replace repeated error reasons with constants

* refactor: extract RATELIMIT error reason to constant

---------

Co-authored-by: 1911860538 <alxps1911@gmail.com>
Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
2025-04-23 17:59:35 +08:00
Joohwan.
5d532fe0cd deps:deps CVE-2025-30204 about golang-jwt (#3642)
Signed-off-by: joohwan <piwriw@163.com>
2025-04-23 13:54:03 +08:00
shown
e47b9292be docs: optimize readme zh docs (#3625) 2025-04-23 13:48:30 +08:00
chentong
23ae7cb096 feat(transport): add Response method to Transport HTTP (#3624)
- Add Response method to Transport interface in transport/http/transport.go
- Implement Response method in Transport struct
- Add test for Response method in transport/http/transport_test.go
- Implement Response method in mockTransport for testing purposes
2025-04-23 13:39:44 +08:00
aveyuan
1c3e0c9062 bc(contrib/log/aliyun): aliyun sls logger (#3622) 2025-04-21 12:43:13 +08:00
Name
9580f086e3 docs: translate Chinese comments to English (#3603)
* docs: translate Chinese comments to English

* docs: modify some comments

---------

Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-04-03 15:09:52 +08:00
DCjanus
025c2dc2b0 deps(contrib/middleware/validate): update protovalidate-go to v0.9.2 (#3572)
* deps(contrib/middleware/validate): update github.com/bufbuild/protovalidate-go to v0.9.2

- Bump buf.build/protovalidate and related packages to latest versions.
- Refactor ProtoValidate middleware to directly use protovalidate for validation, removing legacy support code.

* deps(contrib/middleware/validate): bump Go version from 1.21.1 to 1.23.0

* chore(contrib/middleware/validate): add validation support for generated protobuf messages

- Updated the `generate.go` file to include validation options in the protoc command.
- Bumped the versions of `protoc-gen-go` and `protoc` in `test.pb.go`.
- Introduced a new file `test.pb.validate.go` containing validation logic for protobuf messages.

---------

Co-authored-by: Cluas <Cluas@live.cn>
2025-03-21 15:52:47 +08:00
Name
e534ac33df perf(config): refactor atomicValue Bool method by optimizing string handling (#3475)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-03-20 15:53:00 +08:00
Name
f032ccd476 refactor(contrib/registry/etcd): use service ID as Registry.ctxMap key and encapsulate cancel function in struct serviceCancel (#3509)
Co-authored-by: huangzw <huangzw@2345.com>
2025-03-20 15:52:18 +08:00
Name
522a2f6340 perf: optimize Load method by preallocating slice capacity (#3474)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
2025-03-20 15:51:32 +08:00
uucloud
9ee7290d7a feat(registry/nacos): support service discovery weight (#3561)
* feat(registry/nacos): support service discovery weight

- Add support for reading weight information from metadata during service registration and discovery
- Update test cases to use non-local test server addresses

* chore(registry/nacos): fmt fix

---------

Co-authored-by: Cluas <Cluas@live.cn>
2025-03-20 15:49:58 +08:00
dependabot[bot]
90e02e92a2 build(deps): bump actions/setup-go from 5.1.0 to 5.4.0 (#3590)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.1.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5.1.0...v5.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-20 14:20:47 +08:00
Name
d9aa7ff195 perf(contrib/config/etcd): Optimize Next method of etcd watcher (#3506)
Co-authored-by: huangzw <huangzw@2345.com>
2025-03-15 00:59:58 +08:00
dependabot[bot]
142ea0a93a build(deps): bump Yikun/hub-mirror-action from 1.4 to 1.5 (#3544)
Bumps [Yikun/hub-mirror-action](https://github.com/yikun/hub-mirror-action) from 1.4 to 1.5.
- [Release notes](https://github.com/yikun/hub-mirror-action/releases)
- [Commits](https://github.com/yikun/hub-mirror-action/compare/v1.4...v1.5)

---
updated-dependencies:
- dependency-name: Yikun/hub-mirror-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-12 20:58:52 +08:00