feat(database/gdb): Add the function of obtaining all configurations to facilitate business operations such as verification after addition.#4389
Conversation
…ss operations such as verification after addition. Signed-off-by: sxp20008 <81209245@qq.com>
Signed-off-by: sxp20008 <81209245@qq.com>
Signed-off-by: sxp20008 <81209245@qq.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new function GetAllConfig() to the GDB database package that allows retrieval of all configuration nodes. This facilitates business operations such as verification after adding configurations through AddConfigNode().
- Adds
GetAllConfig()function to return all database configurations - Includes example code demonstrating the new function's usage
- Provides thread-safe access to the global configuration map
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| database/gdb/gdb_core_config.go | Implements the new GetAllConfig() function with proper locking |
| database/gdb/gdb_z_example_test.go | Adds example demonstrating GetAllConfig() usage and imports fmt package |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…le function - Created a new test file `gdb_z_core_config_test.go` to implement unit tests for various methods in the Core struct, including GetDebug, SetDebug, GetDryRun, SetDryRun, GetLogger, SetLogger, SetMaxConnections, GetCache, GetGroup, and GetPrefix. - Removed the unused example function `ExampleGetAllConfig` from `gdb_z_example_test.go` to clean up the codebase.
…ss operations such as verification after addition.