reactive_graph_plugin_service_api/
plugin_resolver.rs

1use async_trait::async_trait;
2use springtime_di::injectable;
3
4use reactive_graph_lifecycle::Lifecycle;
5
6use crate::PluginResolverMode;
7use crate::PluginTransitionResult;
8
9#[injectable]
10#[async_trait]
11pub trait PluginResolver: Send + Sync + Lifecycle {
12    /// Resolves plugins until no more resolve action is possible.
13    async fn resolve_until_idle(&self);
14
15    /// Stops all plugins until all are stopped.
16    async fn stop_until_all_stopped(&self);
17
18    /// Runs the next resolve action.
19    async fn resolve(&self) -> PluginTransitionResult;
20
21    async fn transition_to_fallback_states(&self);
22
23    /// Sets the resolve mode.
24    fn set_mode(&self, mode: PluginResolverMode);
25
26    /// Returns the resolve mode.
27    fn get_mode(&self) -> PluginResolverMode;
28}