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

Factor common functionality in component plugin #1544

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Apr 12, 2021

📔 Description

It turns out that just having a handle to the NODE is already a valuable plugin. Such a plugin can spawn an actor and register itself with the NODE. That's it.

Other plugins, like the analyzer plugin, will then inherit from this plugin.

The component plugin only gives you the node actor and requires that you implement the status subscriber.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

File-by-file.

@dominiklohmann dominiklohmann added the feature New functionality label Apr 12, 2021
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. I didn't test this locally, though, but it's my understanding your are using this already.

libvast/vast/plugin.hpp Outdated Show resolved Hide resolved
libvast/vast/plugin.hpp Outdated Show resolved Hide resolved
@dominiklohmann
Copy link
Member Author

it's my understanding your are using this already.

Yes. I've ported our proprietary analyzer plugins for testing this. Only thing that really changed is the ownership model: The analyzers are now owned by the NODE directly rather than the IMPORTER.

@dominiklohmann dominiklohmann force-pushed the story/ch23936/component-plugin branch 2 times, most recently from e179c62 to 4d8d454 Compare April 12, 2021 14:02
It turns out that just having a handle to the NODE is already a valuable
plugin. Such a plugin can spawn an actor and register itself with the
NODE. That's it.

Other plugins, like the analyzer plugin, will then inherit from this
plugin.

The component plugin only gives you the node actor and requires that you
implement the status subscriber.
@dominiklohmann dominiklohmann merged commit 53c28a7 into master Apr 13, 2021
@dominiklohmann dominiklohmann deleted the story/ch23936/component-plugin branch April 13, 2021 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants