Commit Graph

17 Commits

Author SHA1 Message Date
Kelvin Mwinuka
8ecb9ab54f Restore multi-database state in FSM in the raft layer 2024-07-01 06:06:51 +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
d6162b23f6 Added database support for keyspace methods. Commented cache methods and standalone persistence initialisation until their implementations support databases as well. 2024-07-01 06:04:31 +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
93a616c5c1 Updated RAFT layer to use new keyspace methods. Fixed API methods for HSET and SINTERCARD to match new key overwriting behaviour. 2024-05-26 15:49:51 +08:00
Kelvin Clement Mwinuka
028fb7ccdf Updated expired entry filter function to accept time boundary 'now'. Implemented tests for snapshot package 2024-05-06 14:35:55 +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
Kelvin Clement Mwinuka
6ad3b7baab Exported EchoVault interface now onlu contains the keyspace methods. All other methods are private. Private methods are accessed using the reflect package in the test folder 2024-04-26 02:33:35 +08:00
Kelvin Clement Mwinuka
3e04b7a822 Moved tests for module commands and apis into 'test' folder 2024-04-24 21:36:59 +08:00
Kelvin Clement Mwinuka
fbf4782b7c Instead of passing in EchoVault instance to commands handler, we now pass a struct of params containing all the variables and functions used within the handler function. This removes the modules' dependency on the echovault package. Moved string command and api tests to test/modules/string 2024-04-24 16:34:59 +08:00
Kelvin Mwinuka
3b0493e1d4 Removed StartSnapshot, FinishSnapshot, SetLatestSnapshot, and GetLatestSnapshot funcs from EchoVault interface as these are now private functions passed to the raft module using inversion of control 2024-04-04 03:01:44 +08:00
Kelvin Mwinuka
d7c3509533 Created 'constants' package for const.go file and 'types' package for shared and exported types 2024-04-01 18:32:01 +08:00
Kelvin Mwinuka
bc188cfea4 Moved some types into internal folder as they will do not need to be exported. Changed GetState method to getState to make it private to the echovault package 2024-03-26 20:26:48 +08:00
Kelvin Mwinuka
88a8e2aae6 Created DefaultConfig to be used when embedding echovaule. Moved ACL and PubSub to internal packages with only the associated commands in the modules folder. Initialise ACL and PubSub when creating new EchoVault instance which removed the need to pass WithACL and WithPubSub options. 2024-03-26 18:15:27 +08:00
Kelvin Mwinuka
7fac4143f5 Moved utils.go file to internals folder 2024-03-26 14:00:18 +08:00
Kelvin Mwinuka
e4f4c89a27 Moved memberlist and raft packages to internal folder 2024-03-26 13:47:39 +08:00