Repository navigation
Feature Development: Changes to the BFF Architecture - #50
Conversation
Signed-off-by: udde <udde@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
Signed-off-by: DoisLONG <15221580643@163.com>
| @@ -0,0 +1,47 @@ | |||
| package main | |||
There was a problem hiding this comment.
We need add copyright for all new files. Ref to https://github.com/kubeedge/kubeedge/blob/master/cloud/pkg/cloudstream/cloudstream.go
| "github.com/kubeedge/dashboard/api/pkg/args" | ||
| "github.com/kubeedge/dashboard/api/pkg/handler" | ||
| "github.com/kubeedge/dashboard/client" | ||
| "k8s.io/klog/v2" |
There was a problem hiding this comment.
import need be sorted in three segments: standard lib, third-party lib, project lib.
Signed-off-by: DoisLONG <15221580643@163.com>
| github.com/emicklei/go-restful/v3 v3.12.2 | ||
| github.com/kubeedge/api v1.20.0 | ||
| github.com/kubeedge/dashboard/errors v0.0.0-00010101000000-000000000000 | ||
| github.com/kubeedge/dashboard/client v0.0.0-00010101000000-000000000000 |
There was a problem hiding this comment.
Is there something wrong with the format here?
| kubeedgeClient, err := client.KubeEdgeClient(request.Request) | ||
| if err != nil { | ||
| errors.HandleInternalError(response, err) | ||
| return | ||
| } | ||
|
|
||
| namespace := request.PathParameter("namespace") |
There was a problem hiding this comment.
This part of the code seems to always appear repeatedly. Can it be abstracted into a function and called multiple times?
| kubeedgeClient, err := client.KubeEdgeClient(request.Request) | ||
| if err != nil { | ||
| errors.HandleInternalError(response, err) | ||
| return | ||
| } | ||
|
|
||
| namespace := request.PathParameter("namespace") |
| ) | ||
|
|
||
| func GetVersion(client k8sClient.Interface) (*version.Info, error) { | ||
| klog.V(4).Infof("Getting kubernetes version") |
There was a problem hiding this comment.
| klog.V(4).Infof("Getting kubernetes version") | |
| klog.V(4).Info("Getting kubernetes version") |
There was a problem hiding this comment.
Thanks for the review! I’ve updated the code according to your suggestions.
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Shelley-BaoYue The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Feature Development: Changes to the BFF Architecture
What type of PR is this?
/kind feature
What this PR does / why we need it:
Introduced a BFF layer to optimize frontend-backend communication structure, enhancing data processing capabilities and system maintainability.
Which issue(s) this PR fixes:
Fixes #37
Special notes for your reviewer:
This PR only includes the base structure and example interfaces.
Does this PR introduce a user-facing change?:
NONE