reactive_graph_plugin_service_api/plugin_repository_manager.rs
1use async_trait::async_trait;
2use springtime_di::injectable;
3
4use reactive_graph_lifecycle::Lifecycle;
5
6#[injectable]
7#[async_trait]
8pub trait PluginRepositoryManager: Send + Sync + Lifecycle {
9 /// Scans the plugin hot deploy folder. Moves plugins to the plugin installation folder.
10 fn scan_deploy_repository(&self);
11
12 /// Scans the plugin installation folder and removes duplicates. If the same plugins exists
13 /// multiple times, the plugin with the highest timestamp stays while all other are deleted.
14 fn remove_duplicates(&self);
15
16 /// Scans the plugin installation folder. Creates and registers new plugins to the
17 /// plugin container manager.
18 fn scan_plugin_repository(&self);
19
20 /// Scans the plugin hot deploy folder.
21 ///
22 /// If a new plugin is detected it will be moved to the plugin installation folder
23 /// and a new plugin container will be created and registered.
24 ///
25 /// If an existing plugin is detected a redeployment will be initiated.
26 fn watch_hot_deploy(&self);
27
28 fn unwatch_hot_deploy(&self);
29}