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 the code to make it easy to add plugins #5

Closed
doitian opened this issue Apr 24, 2023 · 0 comments
Closed

Refactor the code to make it easy to add plugins #5

doitian opened this issue Apr 24, 2023 · 0 comments

Comments

@doitian
Copy link
Collaborator

doitian commented Apr 24, 2023

  • Re-organize the code so it's easy to implement a plugin in its own crate. Take care of the dependencies between crates. Also create a template for the pool extension crate. Now adding a plugin requires a lot of boilerplate code.

  • Make it easy to add plugins in Rust. For example, add an Service struct, that we can use it to start the service in our own src/main.rs:

    import otx_service;
    
    fn main() {
        let mut service = OtxService::new();
        service.add_plugin(MyPlugin::new());
        
        service.run();
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants