We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The plugin system should rely on a BasePlugin class that will be inherited by all plugins.
BasePlugin
Example
class ExamplePlugin(BasePlugin): name = "example" requires = [ ConfigValue("db_engine", default="test"), ConfigValue("db_user", required=True), ConfigValue("db_password", required=True) ] def initialize(self): self.microservice.database = crate_db( self.get_config_value("db_engine"), self.get_config_value("db_user"), self.get_config_value("db_password") ) def finalize(self, microservice): self.microservice.database.close()
The following method should be available for every plugin
intialize
finalize
on_method_call
on_method_response
on_request
on_response
on_internal_error
on_jsonrpc_error
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The plugin system should rely on a
BasePlugin
class that will be inherited by all plugins.Example
The following method should be available for every plugin
intialize
- on service initializationfinalize
- on service shutdownon_method_call
- called with a single method callon_method_response
- called with a single responseon_request
- called for a user request (be it a single method call or a batch request)on_response
- called for a http requeston_internal_error
- called for internal errors from methodson_jsonrpc_error
- called for specific jsonrpc errors such as method not found, parse error, etcThe text was updated successfully, but these errors were encountered: