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

Proposed plugin RPC spec #24

Merged
merged 2 commits into from
Jan 8, 2024
Merged

Proposed plugin RPC spec #24

merged 2 commits into from
Jan 8, 2024

Conversation

Andrew-Morozko
Copy link
Contributor

Hello! This is a proposed interface for the plugin system. Let's discuss and settle on this, it will allow some work in parallel since I kinda blocked everyone's work with my parser rewrite 😅

@Andrew-Morozko Andrew-Morozko added the enhancement New feature or request label Jan 7, 2024
@Andrew-Morozko Andrew-Morozko added this to the v0.1 milestone Jan 7, 2024
@Andrew-Morozko Andrew-Morozko linked an issue Jan 7, 2024 that may be closed by this pull request
// "content" or "data" for now
Kind string
// "text", "plugin_a", etc.
Name string
Copy link
Member

@traut traut Jan 7, 2024

Choose a reason for hiding this comment

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

I think it might be good to add another string field here -- a namespace field. Using namespaced plugin names will allow users to use plugins from various providers. So the fully qualified plugin name would be <namespace>/<type>.<name> (see an example in #5). For our plugins the namespace can be blackstork.

The namespace only affects installation of the plugins, but not parsing / execution of the templates

Copy link
Contributor Author

@Andrew-Morozko Andrew-Morozko Jan 7, 2024

Choose a reason for hiding this comment

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

Done! This comment reminded me of an unspoken terminology choice I made. Since type is a reserved name in golang and also there are already a lot of different "types" floating around I started referring to the content or data as "block/plugin kinds" to separate them a bit from every other meaning of "type" I have to work with. It's pretty easy to find-and-replace "Kind" to "Type" if it's objectionable, but I kinda like the term "plugin kind" here.

Copy link
Member

Choose a reason for hiding this comment

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

sounds good!

@Andrew-Morozko
Copy link
Contributor Author

If there are no further suggestions we can merge it!
After I refactor the sprawling mess that is the current parser/plugin code we can place the go file in a more appropriate location, but meanwhile Dominykas can start implementing plugins conforming to this interface

@Andrew-Morozko Andrew-Morozko mentioned this pull request Jan 7, 2024
3 tasks
Copy link
Member

@traut traut left a comment

Choose a reason for hiding this comment

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

looks good!

@Andrew-Morozko Andrew-Morozko merged commit 51868cc into main Jan 8, 2024
@Andrew-Morozko Andrew-Morozko deleted the plugin_iface branch January 8, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin architecture
2 participants