Commit Graph

16 Commits

Author SHA1 Message Date
Kelvin Clement Mwinuka
c7560ce9dd Updated all test suites to include connection and server shutdown on cleanup. 2024-05-31 01:30:18 +08:00
Kelvin Clement Mwinuka
e1d5e8203f Disabled cluster test until a more efficient method is found. 2024-05-29 23:15:27 +08:00
Kelvin Clement Mwinuka
06ce6bfeaf Instead of checking if a value is replicated across the entire cluster, only check if it's present in a cluster quorum. Fixed race conditions in pubsub API by replacing connections map with sync.Map 2024-05-28 20:26:03 +08:00
Kelvin Clement Mwinuka
bb667cf7f7 Added test coverave + fixed some bugs with pubsub api methods. 2024-05-27 18:48:08 +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
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
1a7951f262 Removed EchoVault interface param from raft Opts 2024-04-30 09:36:28 +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 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
d9f1b2276a Removed context parameter from EchoVault, raft, and memberlist shutdown functions 2024-03-26 18:58:53 +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
e4f4c89a27 Moved memberlist and raft packages to internal folder 2024-03-26 13:47:39 +08:00