Kelvin Clement Mwinuka
040f246ea2
Implemented test for LRU cache implementation
2024-05-06 17:16:33 +08:00
Kelvin Clement Mwinuka
148838446b
Pop from LFU and LRU cache using heap.Pop instead of calling the Pop method of the cache directly. Implemented test for lfu cache
2024-05-06 16:57:38 +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
baf5f3d5da
Return error from preamble restore method instead of just logging it. Implemented test for AOF engine persist and restore flow.
2024-05-05 01:30:04 +08:00
Kelvin Clement Mwinuka
915c34d9f6
Refactored Write function of append store to use tidwall/resp to parse commands.
...
AOF log no longer prints an empty line between each command.
Return error on NewAppendStore instead of just logging.
Implemented test for AppendStore
2024-05-04 22:27:05 +08:00
Kelvin Clement Mwinuka
193871ec72
Removed test folder and moved all commands tests to their respective internal modules. Moved api tests into echovault package. This change has been made because the speratate test folder is not idiomatic and caused test coverage report to not be generated.
2024-05-04 17:45:10 +08:00
Kelvin Mwinuka
eb386d5b8f
Merge pull request #35 from EchoVault/chore/test-dynamic-ports
...
Implemented GetFreePort utility function to get free port for tests. …
v0.5.0
2024-05-03 14:25:59 +08:00
Kelvin Clement Mwinuka
6a32f463d0
Implemented GetFreePort utility function to get free port for tests. Updated ACL and PubSub tests to use new GetFreePort functions instead of hardcoded ports
2024-05-03 14:13:16 +08:00
Kelvin Mwinuka
fd500d7c79
Merge pull request #34 from EchoVault/feature/shared-object-extension
...
Load .so plugins at runtime to extend EchoVault
2024-05-03 13:34:18 +08:00
Kelvin Clement Mwinuka
851ca6d11c
Added copyright text
2024-05-03 12:13:59 +08:00
Kelvin Clement Mwinuka
bdf6150b73
Added godoc comments for LoadModule, UnloadModule and ListModules methods
2024-05-03 12:07:39 +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
276ca0fb63
Trigger LoadModule methods in NewEchovault function using module paths from the configuration
2024-05-02 09:35:43 +08:00
Kelvin Clement Mwinuka
24b5e6d39e
Renamed LoadModules and UnloadModules to LoadModule and UnloadModule respectively because they both deal with one module at a time.
2024-05-01 17:39:49 +08:00
Kelvin Clement Mwinuka
8aed3a320d
Implemented LoadModules method for loading modules into EchoVault.
...
Implemented UnloadModules methods for removing module from EchoVault.
Removed connection from plugin handler function parameters as it should not be modified by the module.
2024-05-01 17:37:31 +08:00
Kelvin Mwinuka
f3923033dd
Update README.md
2024-05-01 07:05:20 +08:00
Kelvin Clement Mwinuka
000115ceb0
Created "loadmodules" args for loading ".so" modules into EchoVault.
...
Moved types associated with embedded commands extension into api_admin.go file and deleted types.go file as it's no longer necessary.
Updated docker-compose and Dockerfile.dev to pass .so modules to load on startup.
Volumes folder is no longer ignores except for the nodes subfolder.
2024-04-30 12:17:30 +08:00
Kelvin Clement Mwinuka
d9d9160dc4
Moved types.go file into the echovault package and deleted EchoVault interface as it's no longer in use
2024-04-30 09:49:59 +08:00
Kelvin Clement Mwinuka
1a7951f262
Removed EchoVault interface param from raft Opts
2024-04-30 09:36:28 +08:00
Kelvin Clement Mwinuka
b439bd24f0
Created plugin.go file to handle loading and unloading of plugins to EchoVault
2024-04-29 22:30:16 +08:00
Kelvin Mwinuka
f017d6592d
Merge pull request #33 from EchoVault/feature/embedded-extensions
...
Allow extension of EchoVault commands using the embedded API
2024-04-29 15:29:55 +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
dcb88ffead
Added condition to skip duplicate subcommands when adding a new command with subcommands
2024-04-29 11:31:49 +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
c241cc07b1
Renamed *AccessKey type to better represent the response on *KeyExtractionFunc types
2024-04-28 07:34:34 +08:00
Kelvin Clement Mwinuka
972cbe0a4f
Renamed command API methods to use CamelCase
2024-04-28 07:22:39 +08:00
Kelvin Clement Mwinuka
8baeaa96c1
Enable adding command with subcommands in ADD_COMMAND method
2024-04-28 05:00:46 +08:00
Kelvin Clement Mwinuka
54bed136d4
Added REMOVE_COMMAND method for removing commands or subcommands
2024-04-28 01:15:27 +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
b6825c4eb4
Created EXECUTE_COMMAND method that allows raw execution of loaded commands when in embedded mode
2024-04-27 06:54:21 +08:00
Kelvin Clement Mwinuka
2291ba4f31
Implemented ADD_COMMAND method to add a custom command to echovault
2024-04-27 06:42:57 +08:00
Kelvin Mwinuka
8be29f743a
Merge pull request #32 from EchoVault/refactor/handler-params
...
Refactor HandlerFunc to accept a params struct containing all values & functions instead of an instance of EchoVault interface
2024-04-26 04:16:22 +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
44e4f06670
Deleted ACL type from pkg types
2024-04-25 21:02:12 +08:00
Kelvin Clement Mwinuka
6bf638e622
Renamed all api test files to api_test.go
2024-04-24 22:42:01 +08:00
Kelvin Clement Mwinuka
b6ddb43a49
Removed duplicate imports for set, sorted_set, pubsub and acl modules. Moved /modules from /pkg to /internal. Delted commands package: Commands will now be automatically loaded when an EchoVault instance is initialised.
2024-04-24 22:37:16 +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
2b01c7342c
Update README.md
2024-04-24 14:35:32 +08:00
Kelvin Mwinuka
3e8fd43c3f
Merge pull request #26 from EchoVault/fix/ebedded-acl-auth
...
Embedded parameter for handleCommand method to skip ACL auth
v0.4.1
2024-04-21 03:54:27 +08:00
Kelvin Clement Mwinuka
fce0258e53
Added embedded parameter in handleCommand method which will cause handleCommand to skip ACL auth when it's true
2024-04-21 03:48:14 +08:00
Kelvin Mwinuka
bef3377eff
Merge pull request #25 from EchoVault/fix/key-extraction-func
...
Update KeyExtractionFunc to return a struct containing Channels, ReadKeys, and WriteKeys
2024-04-21 03:07:12 +08:00
Kelvin Clement Mwinuka
c2c887cd75
Updated KeyExtractionFunc for all the modules
2024-04-21 02:59:07 +08:00
Kelvin Clement Mwinuka
7b88122c25
KeyExtractionFunc now returns a struct that specidies channels, read keys and write keys that are accessed by the command. ACL authorization method now checks read keys against allowed read keys, write keys against allowed write keys and channels agains allowed channels.
2024-04-20 23:04:10 +08:00
Kelvin Clement Mwinuka
be44d23c47
Commend refactoring in pubsub module. Variable renaming in api_pubsub.go
2024-04-20 22:40:18 +08:00
Kelvin Clement Mwinuka
2dc5bb9aa6
_ for unsused context parameters in pubsub module
2024-04-18 21:01:34 +08:00
Kelvin Mwinuka
ddd09ee317
Update README.md
2024-04-14 17:55:59 +08:00
Kelvin Mwinuka
2528082d41
Update README.md
2024-04-11 11:01:45 +08:00
Kelvin Mwinuka
c6b246efa4
Merge pull request #21 from EchoVault/chore/fix-race-condition
...
Fixed race conditions in acl module tests
2024-04-06 02:51:27 +08:00
Kelvin Mwinuka
64bbda6205
wg.Done intead of wg.Add in goroutine that starts server in pubusub test module init function
2024-04-06 02:37:44 +08:00