-
Notifications
You must be signed in to change notification settings - Fork 16
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
new: introduce plugin loader code #56
Conversation
60b88b7
to
d7632a5
Compare
d7632a5
to
aebad9d
Compare
07600fa
to
3fa1774
Compare
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
3fa1774
to
c131b2e
Compare
/unhold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
I can't wait to use this loader. 🤩
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jasondellaluce, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 49bab32022e779bcd7e02f26235d1a2d67520039
|
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area plugin-sdk
What this PR does / why we need it:
Which issue(s) this PR fixes:
After the changes in libs of falcosecurity/libs#392 (
yet to get merged), the plugin loading code is isolated in a self-contained package and implements a C api. As such, it is possible to develop loaders in other programming languages by reusing the libs one, which makes it compliant with the targeted libs version out of the box.This first version of the loader is capable of loading plugins, validating them against the currently-supported plugin API version, and reading all their static/descriptive information (name, version, etc...). The loader is also capable of initializing the plugin in order to read initialization-dependent information such as the list of suggested open params.
Special notes for your reviewer:
Blocked and WIP until merging #63.
Since this PR is already big, unit tests and examples will be added in a future PR. Support for more operations on the loaded plugins will be considered in the future.
Most of the changes are related to pulling
plugin_loader.h/.c
from libs. The actual loader code is ~400 LOC and resides in pkg/loader/loader.go.Does this PR introduce a user-facing change?: