mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
js effect for subscribing to config
fix errors chore: Fix some things in the manager for clippy
This commit is contained in:
17
libs/helpers/src/os_api.rs
Normal file
17
libs/helpers/src/os_api.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use models::Error;
|
||||
use models::PackageId;
|
||||
use serde_json::Value;
|
||||
|
||||
pub struct RuntimeDropped;
|
||||
|
||||
pub type Callback = Box<dyn Fn(Value) -> Result<(), RuntimeDropped> + Send + Sync + 'static>; // bool indicating if
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait OsApi: Send + Sync + 'static {
|
||||
async fn get_service_config(
|
||||
&self,
|
||||
id: PackageId,
|
||||
path: &str,
|
||||
callback: Callback,
|
||||
) -> Result<Value, Error>;
|
||||
}
|
||||
Reference in New Issue
Block a user