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 FlushAll, FlushDB commands #3117

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

niharikabhavaraju
Copy link
Collaborator

@niharikabhavaraju niharikabhavaraju commented Feb 10, 2025

Go: Implement FlushAll, FlushDB commands

Signed-off-by: Niharika Bhavaraju <[email protected]>
@niharikabhavaraju niharikabhavaraju requested a review from a team as a code owner February 10, 2025 11:50
@niharikabhavaraju niharikabhavaraju self-assigned this Feb 10, 2025
@niharikabhavaraju niharikabhavaraju changed the title Go: Implement FlushAll command Go: Implement FlushAll, FlushDB commands Feb 10, 2025
@Yury-Fridlyand Yury-Fridlyand added the go golang wrapper label Feb 10, 2025
// fmt.Println(res) // OK
//
// [valkey.io]: https://valkey.io/commands/flushall/
func (client *GlideClusterClient) FlushAllWithOptions(mode options.FlushMode, opts options.RouteOption) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can create

type FlushClusterOptions struct {
    *FlushMode
    *RouteOption
}

In client API check for nil each component. I think we already have this done for another command (probably INFO).

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

//
// `"OK"` response on success.
//
// Example:
Copy link
Collaborator

@jbrinkman jbrinkman Feb 12, 2025

Choose a reason for hiding this comment

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

Examples should not exist in the document block and instead should be placed in the relevant test file. See the Go Developer Guide for Valkey-Glide.

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