Commit Graph

941 Commits

Author SHA1 Message Date
Kelvin Mwinuka
389c871781 Start raft and memberlist layers in NewEchoVault. Return error fron NewEchoVault function when TLS config does not match certificate options provided 2024-04-01 23:24:22 +08:00
Kelvin Mwinuka
ede342a452 Implemented unit tests for generic module API 2024-04-01 22:37:26 +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
4010306dee Updated build and test command in go.yml workflow file 2024-04-01 17:49:20 +08:00
Kelvin Mwinuka
d1d613d812 Added api test files 2024-04-01 17:44:33 +08:00
Kelvin Mwinuka
04b61443ee Added license header to api test files 2024-04-01 17:39:53 +08:00
Kelvin Mwinuka
dea2ef25ea Implemented unit tests for string module API 2024-04-01 17:31:44 +08:00
Kelvin Mwinuka
e40e49eb4b Skip AOF command logging if ReadWriter is nil. Pass config to api test files to prevent aof data directory from being created everytime tests are executed. 2024-04-01 01:29:37 +08:00
Kelvin Mwinuka
0b66936808 Implemented unit tests for SET module API 2024-04-01 01:13:12 +08:00
Kelvin Mwinuka
42a8ad2a5b Implemented unit tests for HASH API 2024-03-31 21:09:58 +08:00
Kelvin Mwinuka
f061af6de6 Implemented tests for sorted set API 2024-03-31 05:55:26 +08:00
Kelvin Mwinuka
8af093741f Implemented tests for list module API 2024-03-30 20:08:59 +08:00
Kelvin Mwinuka
cb13e8222d Created test for LLEN API function 2024-03-30 03:28:31 +08:00
Kelvin Mwinuka
7bbae29ba5 Renamed ReadMessage in api_pubsub.go to ReadPubSubMessage 2024-03-30 02:31:20 +08:00
Kelvin Mwinuka
c56e749167 Implemented outward-facing API for Pub/Sub module 2024-03-30 02:30:37 +08:00
Kelvin Mwinuka
682261b35d Implemented outward-facing API for commands in the ACL module. Excluded the AUTH command as this is only relevant for TCP clients 2024-03-29 23:32:04 +08:00
Kelvin Mwinuka
328165d2b3 Removed Score and Member types in api_sorted_set.go in favour of simpler built-in types 2024-03-29 22:23:01 +08:00
Kelvin Mwinuka
8a8a3573bf ZSCORE API now returns nil if there are no scores to return 2024-03-29 04:42:02 +08:00
Kelvin Mwinuka
1016a1b903 Added license header to api_pubsub.go file 2024-03-29 04:03:42 +08:00
Kelvin Mwinuka
3c81ceb9ed Updated test coverage 2024-03-29 03:57:19 +08:00
Kelvin Mwinuka
d7fd7616a3 Implemented outward-facing API for sorted set module commands 2024-03-29 03:42:49 +08:00
Kelvin Mwinuka
b1ddcd178e Implemented outward-facing API for ADMIN module commands.
Added Module field to Command and SubCommand structs.
Added MODULE filter options to COMMAND LIST command.
Added Module field to all existing commands.
2024-03-28 23:51:47 +08:00
Kelvin Mwinuka
6b9db4e8c8 Implemented outward-facing API for STRING module commands 2024-03-28 23:08:40 +08:00
Kelvin Mwinuka
76568285ab Implemented outward-facing API for SET module commands 2024-03-28 22:52:32 +08:00
Kelvin Mwinuka
77300f033a Changed 'value' in list commands' descriptions to 'element' for more clarity. 2024-03-28 22:02:45 +08:00
Kelvin Mwinuka
6fb6862e78 Implemented outward-facing API for LIST module commands 2024-03-28 21:57:51 +08:00
Kelvin Mwinuka
1d15b89b87 Created outward-facing API for hash module commands 2024-03-28 21:31:14 +08:00
Kelvin Mwinuka
ede32b481f Created outward-facing API or generic module commands 2024-03-28 19:36:55 +08:00
Kelvin Mwinuka
0a70104d78 Created api_ files in echovault subfolder that will allow us to export easyily usable APIs for embedding Go code 2024-03-27 14:25:34 +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
a8ad7e3db1 Removed Commands filter helpers as there's no planned usage for them 2024-03-26 19:37:40 +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
7fff89a250 Removed context argumebt from server start method in cmd/main.go 2024-03-26 18:52:22 +08:00
Kelvin Mwinuka
9113998281 Fixed test error with regards to passing context to mockServer Start method 2024-03-26 18:50:49 +08:00
Kelvin Mwinuka
a9e183cf6d Removed context parameter from Start, startTCP and handleConnection functions. These functions now directly pull the context from the EchoVault struct instance 2024-03-26 18:46:49 +08:00
Kelvin Mwinuka
ad6b3b8e10 Changed StartTCP to startTCP to make it a private function 2024-03-26 18:39:07 +08:00
Kelvin Mwinuka
a1789ad266 Comment update in config package in pkg folder 2024-03-26 18:16:58 +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
fbc866f844 Updated test coverage 2024-03-26 16:21:05 +08:00
Kelvin Mwinuka
7c39e5f477 Created commands and config packages in pkg folder for easy import 2024-03-26 15:04:05 +08:00
Kelvin Mwinuka
7fac4143f5 Moved utils.go file to internals folder 2024-03-26 14:00:18 +08:00
Kelvin Mwinuka
e70d1016e9 Removed Plugin type from types.go 2024-03-26 13:57:27 +08:00
Kelvin Mwinuka
a3fbbd1243 Renamed eviction2 import alias to eviction 2024-03-26 13:53:42 +08:00
Kelvin Mwinuka
7cec2da854 Moved aof and snapshot packages to internal folder 2024-03-26 13:51:37 +08:00
Kelvin Mwinuka
e4f4c89a27 Moved memberlist and raft packages to internal folder 2024-03-26 13:47:39 +08:00
Kelvin Mwinuka
57cb8b3cc2 Fixed WithContext option function 2024-03-26 10:18:13 +08:00
Kelvin Mwinuka
3dbd3569d0 EchoVault context is now private 2024-03-26 10:17:13 +08:00
Kelvin Mwinuka
5c86fb6215 Moved main.go file to cmd subfolder. Renamed src folder to pkg folder as it will contain all the importable package code. Moved config.go to new internals folder 2024-03-25 21:13:40 +08:00
Kelvin Mwinuka
c72e982833 Refactored EchoVault struct fields to make them private 2024-03-25 20:21:38 +08:00
Kelvin Mwinuka
893d577ed2 isInCluster is not a private function 2024-03-25 20:06:26 +08:00