tianxiaoliang commented on a change in pull request #787:
URL:
https://github.com/apache/servicecomb-service-center/pull/787#discussion_r548951500
##########
File path: server/service/gov/config_distributor.go
##########
@@ -41,8 +42,9 @@ type ConfigDistributor interface {
Create(kind, project string, spec []byte) error
Update(id, kind, project string, spec []byte) error
Delete(id, project string) error
+ Display(project, app, env string) ([]byte, error)
Review comment:
接口分离,满足单一职责
##########
File path: server/service/gov/config_distributor.go
##########
@@ -87,14 +89,17 @@ func Create(kind, project string, spec []byte) error {
func List(kind, project, app, env string) ([]byte, error) {
for _, cd := range distributors {
+ if kind == DisplayKey {
+ return cd.Display(project, app, env)
Review comment:
if写在resource层,这个有点定制了
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]