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

feat: Support for Plugins #215

Merged
merged 24 commits into from
Mar 14, 2024
Merged

feat: Support for Plugins #215

merged 24 commits into from
Mar 14, 2024

Conversation

TurtIeSocks
Copy link
Owner

@TurtIeSocks TurtIeSocks commented Dec 14, 2023

This PR adds a plugin system to Koji that supports plugins for bootstrapping, clustering, and routing.

The plugin system has been documented extensively on the docs site so I'll only detail codebase changes in this PR. Those curious about the functionality should view this branch's docs.

Overview

  • Adds a plugin folder in each of the 3 respective categories folders that users can drop individual files or folders into
  • When starting up a session in the client, these directories are read from and it generates the plugin list on demand
  • You do not need to recompile or even restart Koji to update the functionality of your plugin, since it is called on demand, in a child process
  • While this PR is not breaking, you must recompile the TSP binary upon pulling, this is because the file location has moved and you should be doing this after every update anyway. See docs for a full updating script.

Client Changes

  • Modifies the existing number input field to be a general text input field as well, to support adding custom args to each respective plugin

Server Changes

  • Adds the Plugin struct that is used for all 3 algorithm categories.
  • Reworks some deserializing of certain args to now account for any possible string
  • Breaks the Basic Sorting traits into smaller traits
  • Makes the joining logic used by route_split_level a little more generic
  • Default for route_split_level is now 0 instead of 1

Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
koji ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 7:47pm

Copy link
Collaborator

@clburlison clburlison left a comment

Choose a reason for hiding this comment

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

Reviewed the docs only and they make sense to me. I didn't test the code or attempt to create my own plugin (no time 😅 )

@TurtIeSocks TurtIeSocks merged commit aeb6b06 into main Mar 14, 2024
3 checks passed
@TurtIeSocks TurtIeSocks deleted the feat-plugins branch March 14, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants