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

Go: Implement Custom Command with route(Generic Cluster cmd), Ping with Route #2979

Merged
merged 27 commits into from
Jan 29, 2025

Conversation

niharikabhavaraju
Copy link
Collaborator

Go: Implement Custom Command with route(Generic Cluster cmd), Ping with Route

@niharikabhavaraju niharikabhavaraju requested a review from a team as a code owner January 20, 2025 09:49
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

We discussed API naming with the team and agreed to follow approach we started with node client. If command have optional argument, we wrap them with options struct and provide 2 APIs: cmd and cmdWithOptions.
Currently PING has 2 optional arguments and 4 APIs (4 permutations):

  • Ping
  • PingWithMessage
  • PingWithRoute
  • PingWithMessageAndRoute

Imagine PING gets a new optional argument later in future. Current solution is not scalable. So the proposal is to refactor it now into the following:

  • Ping
  • PingWithOptions

And follow that approach for all commands.
If you have any concerns, please, share. I'm happy to discuss that there or in a GLIDE contribution meeting.

go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/integTest/cluster_commands_test.go Outdated Show resolved Hide resolved
@niharikabhavaraju niharikabhavaraju self-assigned this Jan 22, 2025
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Signed-off-by: Niharika Bhavaraju <[email protected]>
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Please split into 2 PRs and rework ping options

go/api/config/request_routing_config.go Outdated Show resolved Hide resolved
go/api/connection_management_cluster_commands.go Outdated Show resolved Hide resolved
go/api/errors/errors.go Outdated Show resolved Hide resolved
go/api/glide_client.go Outdated Show resolved Hide resolved
go/api/glide_client.go Outdated Show resolved Hide resolved
go/api/options/ping_options.go Outdated Show resolved Hide resolved
go/api/connection_management_cluster_commands.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Show resolved Hide resolved
go/api/response_types.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Show resolved Hide resolved
go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
go/integTest/cluster_commands_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

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

Last minor doc updates

go/api/glide_cluster_client.go Outdated Show resolved Hide resolved
@Yury-Fridlyand Yury-Fridlyand merged commit dc79586 into valkey-io:main Jan 29, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go golang wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants