Skip to content
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

add client version message in connect response for gateway #82

Merged
merged 4 commits into from
Jan 23, 2022

Conversation

freekatz
Copy link
Contributor

No description provided.

@@ -276,10 +276,10 @@ func getMapInfo(valWarp *wrapper.ValueWrapper, _verticesParsedList *list, _edges
}

// Connect return if the nebula connect succeed
func Connect(address string, port int, username string, password string, version nebula.Version) (nsid string, err error) {
nsid, err = pool.NewClient(address, port, username, password, version)
func Connect(address string, port int, username string, password string, version nebula.Version) (nsid string, ver nebula.Version, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just return nebula.GraphClient, error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just return nebula.GraphClient, error?

The Studio need the returned nsid to identify a connect session. So If return GraphClient interface may cause some problems.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about return nsid, nebula.GraphClient, error ?
Or define an interface to return?

This is convenient for expansion, and if more information is needed in the future, more and more return values will be returned.

@@ -59,7 +59,7 @@ func (this *DatabaseController) Connect() {
this.Ctx.SetCookie("SameSite", "Strict")
this.SetSession(beego.AppConfig.String("sessionkey"), nsid)

res.Message = "Login successfully"
res.Message = string(ver)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The business code does not provide new features, and the follow-up is only maintenance.
Let studio do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

Copy link
Contributor Author

@freekatz freekatz Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The business code does not provide new features, and the follow-up is only maintenance. Let studio do this?

But the Studio don't konw which nebula client version it connected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The studio is use golang server now, the api will no longer use the controller here.

@veezhang
Copy link
Contributor

You need to rebase to resolve the conflict.

@freekatz freekatz reopened this Jan 19, 2022
@freekatz
Copy link
Contributor Author

You need to rebase to resolve the conflict.

Ok.

@freekatz freekatz closed this Jan 20, 2022
@freekatz freekatz reopened this Jan 21, 2022
Copy link
Contributor

@veezhang veezhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@veezhang veezhang merged commit ece2b90 into vesoft-inc:master Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants