Skip to content

Commit

Permalink
Moved Echo comman to connection mngt
Browse files Browse the repository at this point in the history
Signed-off-by: EdricCua <[email protected]>
  • Loading branch information
EdricCua committed Jan 6, 2025
1 parent 809df46 commit 0202d3f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 19 additions & 0 deletions go/api/connection_management_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,23 @@ type ConnectionManagementCommands interface {
//
// [valkey.io]: https://valkey.io/commands/ping/
PingWithMessage(message string) (string, error)

// Echo the provided message back.
// The command will be routed a random node.
//
// Parameters:
// message - The provided message.
//
// Return value:
// The provided message
//
// For example:
// result, err := client.Echo("Hello World")
// if err != nil {
// // handle error
// }
// fmt.Println(result.Value()) // Output: Hello World
//
// [valkey.io]: https://valkey.io/commands/echo/
Echo(message string) (Result[string], error)
}
19 changes: 0 additions & 19 deletions go/api/string_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,23 +455,4 @@ type StringCommands interface {
//
//[valkey.io]: https://valkey.io/commands/getdel/
GetDel(key string) (Result[string], error)

// Echo the provided message back.
// The command will be routed a random node.
//
// Parameters:
// message - The provided message.
//
// Return value:
// The provided message
//
// For example:
// result, err := client.Echo("Hello World")
// if err != nil {
// // handle error
// }
// fmt.Println(result.Value()) // Output: Hello World
//
// [valkey.io]: https://valkey.io/commands/echo/
Echo(message string) (Result[string], error)
}

0 comments on commit 0202d3f

Please sign in to comment.