-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat: Add plugin system #10
base: dev
Are you sure you want to change the base?
Conversation
Also this currently stacks on top of #8 since that is what I used for development |
// TODO: there's probably a better way of doing this without relying on the file extension | ||
if strings.HasSuffix(filePath, ".gz") { |
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.
Grabbing the first few bytes of the file and doing:
if bytes.HasPrefix(buf, []byte{0x1F, 0x8B, 0x08}) {
can be a nicer way to handle this.
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.
Thanks for working on this - it looks super cool, and I cannot wait to receive my JetKVM and test it out :)
I wanted to comment on a few things that stood out to me whilst reading the code - please see below.
P.S. There seem to be a few files without newlines at the end, which might not be preferable on POSIX systems
It might be nice to pull this jsonrpc refactor into its own pull request that gets merged separately so that it doesn't confuse what is related to the plugin change vs just general improvements to use it later. |
#28 👍 |
Going to do the configuration after this work has been merged since I technically don't need it for Tailscale support :D not that it would be much help for other things without it. Removing the WIP status on this now as it's ready to review in its current state |
Is it possible to read from the package and show what version of the plugin that instance is running? What happens if you install two or more of the same/different version of a plugin? |
The system will just no-op if you try to install the same version. A different version should shut down the old one and start the new one up.... let me test that. |
…juicy bits about the plugin
For anyone looking to try this feature out before it's merged (without building it yourself), I've pulled it into jetkvm-next and added a built binary: |
Based on discussion #9 implement the basics of a plugin system that can be used to extend the functionality of JetKVM.
In order to accomplish this, the task is broken down into many steps:
Basic JSON configuration management(separate PR)Stacked on #28