-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1450 from DiceDB/arpit-readiness-cli-chat
Handshake and cleaner WatchManager implementation
- Loading branch information
Showing
13 changed files
with
151 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## Potential Risks | ||
Chatroom | ||
=== | ||
|
||
1. may have update when multiple updates happen at same time (granualrity)? | ||
```sh | ||
$ go run main.go <username> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2022-present, DiceDB contributors | ||
// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information. | ||
|
||
package cmd | ||
|
||
import ( | ||
dstore "github.com/dicedb/dice/internal/store" | ||
) | ||
|
||
var cHANDSHAKE = &DiceDBCommand{ | ||
Name: "HANDSHAKE", | ||
HelpShort: "HANDSHAKE is used to handshake with the database; sends client_id and execution mode", | ||
Eval: evalHANDSHAKE, | ||
} | ||
|
||
func init() { | ||
commandRegistry.AddCommand(cHANDSHAKE) | ||
} | ||
|
||
func evalHANDSHAKE(c *Cmd, s *dstore.Store) (*CmdRes, error) { | ||
if len(c.C.Args) != 2 { | ||
return cmdResNil, errWrongArgumentCount("HANDSHAKE") | ||
} | ||
c.ClientID = c.C.Args[0] | ||
c.Mode = c.C.Args[1] | ||
return cmdResOK, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2022-present, DiceDB contributors | ||
// All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE file in the project root for full license information. | ||
|
||
package cmd | ||
|
||
import ( | ||
dstore "github.com/dicedb/dice/internal/store" | ||
) | ||
|
||
var cMODE = &DiceDBCommand{ | ||
Name: "MODE", | ||
HelpShort: "MODE sets the mode of the client", | ||
Eval: evalMODE, | ||
} | ||
|
||
func init() { | ||
commandRegistry.AddCommand(cMODE) | ||
} | ||
|
||
func evalMODE(c *Cmd, s *dstore.Store) (*CmdRes, error) { | ||
return cmdResOK, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters