Commit Graph

17 Commits

Author SHA1 Message Date
Kelvin Mwinuka
d31cb10b51 Obtain a read lock on connection info before logging command. 2024-07-01 06:37:23 +08:00
Kelvin Mwinuka
59143b4cd5 Added multi-database support for loggin and restoring in log engine.
Added multi-database support for preamble snapshots and restoration in preamble engine.
Added multi-database support for aof engine.
Removed buffered channel from log and aof engines. Command logging is now synchronous.
Added multi-database support for the raft layer's data replication.
2024-07-01 06:06:26 +08:00
Kelvin Mwinuka
1a8d2314cd Implemented FLUSHDB and FLUSHALL command to clear logical databases. 2024-07-01 06:05:17 +08:00
Kelvin Mwinuka
9e4b61fce7 Implemented SWAPDB command handler. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
dc9b33bc15 Added ability to set the connection's database in SetConnectionInfo function. Implemented SELECT command to allow TCP connections to select a different database. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
93a165e9f9 Added support for HELLO command.
Load modules build from Dockerfile.dev into instances from docker-compose.yml.
Fixed user loading from config file in ACL module.
2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
ddea7ab127 Added tracking for embedded client connection info. Moved logic to determine which connection info to use into the handleCommand function. 2024-07-01 06:05:07 +08:00
Kelvin Clement Mwinuka
c4b42854b1 Initialise volatile key tracker on startup. Create a database if it does not exist when trying to set a value. 2024-07-01 06:05:07 +08:00
Kelvin Clement Mwinuka
9745270b40 Added placeholders for adding protocol and database version in raft replication flow 2024-07-01 06:04:31 +08:00
Kelvin Clement Mwinuka
6f8511632e Close client connection on quit command 2024-05-30 20:01:24 +08:00
Kelvin Clement Mwinuka
502e804459 Removed logic to get unexported methods from the echovault package in all tests. 2024-05-30 19:33:01 +08:00
Kelvin Clement Mwinuka
0108444d69 Replaced fmt.Println statements with log.Println.
Return "empty command" error from handleCommand method if an empty command is passed to the server.
Wait until connection is no longer nil in acl package tests.
2024-05-27 11:45:48 +08:00
Kelvin Clement Mwinuka
43361cdd42 Updated keyspace methods' signatures and made them all private. Ditched lock-per-key for a store-wide rwmutex. Updated HandlerFuncParams to match new keyspace method signatures. 2024-05-22 22:44:59 +08:00
Kelvin Clement Mwinuka
0f6ae1c8ac Implemented LoadModules method to load external modules at runtime.
Implemented UnloadModules method to remove modules at runtime.
Implemented ListModules method to list the current loaded modules.
Implemented "MODULE LOAD", "MODULE UNLOAD", and "MODULE LIST" commands.
2024-05-03 11:57:21 +08:00
Kelvin Clement Mwinuka
281c4f27a7 Added godoc commends for embedded methods and types to extend commands. Moved constants to internal directory 2024-04-29 15:20:10 +08:00
Kelvin Clement Mwinuka
1d56e9839b Implemented tests for AddCommand, ExecuteCommand and RemoveCommand methods 2024-04-28 10:43:46 +08:00
Kelvin Clement Mwinuka
97f4617d86 Moved all packages from /pkg directory to the root directory. Deleted /pkg directory. Pass keyspace functions to raft package instead of an EchoVault instance. This removes dependency on the echovault pakage from the raft package. 2024-04-28 00:37:45 +08:00