dubbo-admin Console API 开发与审查
dubbo-admin-console-api
实现并审查 dubbo-admin Console API 的变更。当用户询问 HTTP 端点、Gin 路由、处理器(handler)、请求或响应模型、console 服务、错误处理、API 分页,或 pkg/console/ 下从 handler 到 service 到 manager 再到 store 的调用流程时使用。除非影响 Console API 行为,否则不用于纯前端、纯服务发现或存储内部任务。
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 4.1k
- Forks
- 2.2k
01 前言 Front Matter
- name
- dubbo-admin-console-api
- description
- Implements and reviews dubbo-admin Console API changes. Use when the user asks about HTTP endpoints, Gin routes, handlers, request or response models, console services, error handling, API pagination, or the handler to service to manager to store flow under pkg/console/. Do not use for frontend-only, discovery-only, or store-internals tasks unless they affect Console API behavior.
02 资源文件 2
- 参考文档evals/evals.json1.2 KB
- 参考文档references/web-mvc-flow.md5.8 KB
03 SKILL.md 正文
dubbo-admin Console API
Purpose
Use this skill to change or explain dubbo-admin Web MVC behavior consistently across router, handler, model, service, manager, and store layers.
When to use
Use for Console API endpoint additions, request binding, response models, service logic, route registration, API error handling, and backend API review.
Do not use for Vue-only changes, registry discovery internals, or memory store implementation details unless an API contract depends on them.
Inputs
Required:
- Target endpoint, handler, model, or package path.
- Intended API behavior or observed bug.
Optional:
- Example request or response payload.
- Related frontend API caller.
- Existing route or service function to mirror.
If missing, inspect pkg/console/router/router.go first and ask only for behavior that cannot be inferred from code.
Workflow
- Locate the route in
pkg/console/router/router.go. - Read the matching handler in
pkg/console/handler/for binding and response style. - Read or update request and response types in
pkg/console/model/. - Put business logic in
pkg/console/service/; keep handlers focused on HTTP concerns. - Use
ctx.ResourceManager()and helpers inpkg/core/manager/for resource access. - Return responses with
model.NewSuccessResp,util.HandleArgumentError, orutil.HandleServiceError. - If endpoint behavior is unclear, read
references/web-mvc-flow.md.
Output format
Return changed files, endpoint behavior, request and response contract, validation performed, and any frontend impact.
Validation
- Confirm the route is registered under
/api/v1. - Confirm handler binding matches method semantics: query for reads, JSON body for mutations.
- Confirm service code returns typed models and propagates business errors.
- Run focused Go tests for changed packages; use
make testfor shared API behavior.
Edge cases
- Some handlers include lightweight auth, cookie, or parameter logic; do not force all logic into services.
- If changing response fields, check frontend callers under
ui-vue3/src/api/. - If a resource query becomes slow, switch to
dubbo-admin-store.
References
- Read
references/web-mvc-flow.mdfor the current route, handler, service, and response pattern.
04 同仓库更多 Skills
dubbo-admin 资源存储与索引开发
dubbo-admin-store
实现和审查 dubbo-admin 资源存储与索引变更。当用户询问 ResourceStore API、store 路由、内存 store 行为、索引注册、IndexCondition、ListByIndexes、PageListByIndexes、ByMeshIndex、radix-tree(基数树)前缀查找,或 pkg/core/store/、pkg/core/store/index/ 和 pkg/store/ 时使用。除非需要改动 store 或索引,否则不用于前端、Console API、发现或引擎任务。
dubbo-admin 运行时组件开发
dubbo-admin-runtime
实现和审查 dubbo-admin 运行时组件变更。当用户询问组件抽象、组件组合、运行时 bootstrap、依赖顺序、注册、生命周期、启动、关闭、runtime builder 行为,或 pkg/core/runtime/ 和 pkg/core/bootstrap/ 时使用。除非组件生命周期或依赖关系受到影响,否则不用于发现、引擎、store、Console API 或前端任务。
dubbo-admin Vue3 前端开发
dubbo-admin-frontend
实现和审查 dubbo-admin Vue 3 前端变更。当用户询问 ui-vue3、Vue 视图或组件、前端路由、路由元数据、API 客户端、Pinia store、SearchDomain、i18n、布局标签页(layout tabs)、流量规则表单设计、前端测试,或 Vite、ESLint 和 Prettier 配置时使用。除非需要与前端协调 API 契约,否则不用于 Go 后端内部逻辑。
dubbo-admin 事件总线开发
dubbo-admin-events
实现和审查 dubbo-admin EventBus 事件分发。当用户询问 Event、Emitter、Subscriber、SubscriptionManager、EventBus 组件注册、Subscribe 或 Unsubscribe 行为、Send 分发规则、订阅者 ProcessEvent 流程、基于 resource-kind 的路由,或 pkg/core/events/ 下的事件错误处理时使用。除非任务会改变事件总线契约或分发语义,否则不用于领域订阅者。
dubbo-admin 资源引擎开发
dubbo-admin-engine
实现和审查 dubbo-admin 资源引擎变更。当用户询问运行时基础设施发现、引擎工厂、Kubernetes 或 mock 引擎的 ListWatchers、RuntimeInstance informers、RuntimeInstanceEventSubscriber、引擎 leader election(主节点选举),或将 RuntimeInstance 数据合并到 Instance 资源(相关功能位于 pkg/core/engine/ 和 pkg/engine/ 下)时使用。除非任务涉及引擎来源的 RuntimeInstance 资源,否则不用于注册发现。
dubbo-admin 架构问题路由
dubbo-admin-domain
将 dubbo-admin 架构问题路由到相应的领域技能。用于跨模块问题、端到端流程、子系统边界,或判断是否需要运行时(runtime)、服务发现(discovery)、引擎(engine)、事件(events)、存储(store)、Console API 或前端方面的指导。当请求明确针对某个子系统时,优先使用更具体的 dubbo-admin-* 技能。