generated from go-kratos/kratos-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helloworld): integrate consul for configuration management
- Add consul client and configuration source to the helloworld service - Implement context and signal handling in the NewApp function - Update buildApp function to include context parameter - Modify main function to use consul for configuration synchronization - Add metrics middleware support in the configuration file
- Loading branch information
Showing
9 changed files
with
525 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
service_name = "helloworld_service_name" | ||
version = "version_1.0.0" | ||
|
||
[server.http] | ||
addr = "0.0.0.0:8000" | ||
timeout = "1s" | ||
addr = "0.0.0.0:8000" | ||
timeout = "1s" | ||
|
||
[server.grpc] | ||
addr = "0.0.0.0:9000" | ||
timeout = "1s" | ||
|
||
[server.grpc] | ||
addr = "0.0.0.0:9000" | ||
timeout = "1s" | ||
[data.database] | ||
driver = "mysql" | ||
source = "root:root@tcp(127.0.0.1:3306)/test?parseTime=True&loc=Local" | ||
|
||
[data.database] | ||
driver = "mysql" | ||
source = "root:root@tcp(127.0.0.1:3306)/test?parseTime=True&loc=Local" | ||
[data.redis] | ||
addr = "127.0.0.1:6379" | ||
read_timeout = "0.2s" | ||
write_timeout = "0.2s" | ||
|
||
[data.redis] | ||
addr = "127.0.0.1:6379" | ||
read_timeout = "0.2s" | ||
write_timeout = "0.2s" | ||
[server.middleware.metrics] | ||
enabled = true | ||
name = "promtheus_metrics" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.