-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: support memory type of store #1332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduces a memory-based implementation of the ResourceStore interface to support in-memory resource storage for the Dubbo Admin project. This allows the application to use memory as a store backend instead of requiring external databases.
- Implements a complete memory-based ResourceStore using Kubernetes client-go cache mechanisms
- Refactors error handling by renaming the
errorspackage tobizerrorto avoid conflicts - Updates store interface to use
stringtype for index values instead ofinterface{}
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/store/memory/store.go | Core implementation of memory-based resource store |
| pkg/store/memory/store_test.go | Comprehensive test suite for memory store functionality |
| pkg/store/memory/factory.go | Factory implementation for creating memory stores |
| pkg/core/store/store.go | Interface updates to support new GetByKeys method and string-typed indexes |
| pkg/common/bizerror/common.go | Package renamed from errors to bizerror |
| Multiple files | Updated imports and method signatures to use bizerror and string-typed indexes |
| app/dubbo-admin/dubbo-admin.yaml | Configuration updated to use memory store type |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 20 out of 20 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| ctx.ResourceManager(), | ||
| meshresource.DynamicConfigKind, | ||
| map[string]interface{}{ | ||
| map[string]string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没觉得这个改动有多大意义
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是因为client go 的index接口中使用的是string类型,在上层将interface改为string有助于上层使用索引时知道这个特性
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
pkg/store/memory/store_test.go:1
- [nitpick] Use
total--instead oftotal -= 1for consistency with Go idioms when decrementing by one.
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.



Please provide a description of this PR:
Using memory to support ResourceStore. Ref: #1308
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.