Documentation ¶
Index ¶
- Constants
- func Delete(pluginDir, filename string) error
- func GeneratePluginPaths(staticPluginDir string, pluginDir string) ([]string, error)
- func HandlePluginEvents(staticPluginDir, pluginDir string, notify <-chan string, ...)
- func HandlePluginReload(cache cache.Cache[interface{}], w http.ResponseWriter)
- func PopulatePluginsCache(staticPluginDir, pluginDir string, cache cache.Cache[interface{}])
- func Watch(path string, notify chan<- string)
Constants ¶
View Source
const ( PluginRefreshKey = "PLUGIN_REFRESH" PluginListKey = "PLUGIN_LIST" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePluginPaths ¶
GeneratePluginPaths takes the staticPluginDir and pluginDir and returns a list of plugin paths.
func HandlePluginEvents ¶
func HandlePluginEvents(staticPluginDir, pluginDir string, notify <-chan string, cache cache.Cache[interface{}], )
HandlePluginEvents handles the plugin events by updating the plugin list and plugin refresh key in the cache.
func HandlePluginReload ¶
func HandlePluginReload(cache cache.Cache[interface{}], w http.ResponseWriter)
HandlePluginReload checks if the plugin refresh key is set to true and sends a signal to the frontend to reload the plugins by setting the X-Reload header to reload.
func PopulatePluginsCache ¶
PopulatePluginsCache populates the plugin list and plugin refresh key in the cache.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.