Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor command modules to use dependency injection of required parameters for command handlers #27

Closed
kelvinmwinuka opened this issue Apr 24, 2024 · 0 comments · Fixed by #32
Assignees
Labels
advanced An advanced enhancement requiring deep knowledge of the codebase and/or a particular topic

Comments

@kelvinmwinuka
Copy link
Collaborator

At the moment, HandlerFunc accepts a parameter that implements the EchoVault interafce. This causes the command modules to depend on the the echovault package, forcing the command modules to be placed in the pkg folder which is not idea.

The fix is to use Inversion of control to pass in all the functions, context, command and connection needed by the command handler, thus removing the dependence on the echovault package in any of the command modules.

This fix should also allow us to move the modules folder from /pkg to /internal. It should also make it easier to implement shared object file extension of echovault commands.

@kelvinmwinuka kelvinmwinuka added the advanced An advanced enhancement requiring deep knowledge of the codebase and/or a particular topic label Apr 24, 2024
@kelvinmwinuka kelvinmwinuka self-assigned this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced An advanced enhancement requiring deep knowledge of the codebase and/or a particular topic
Projects
None yet
1 participant