mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Feat/long running sockets (#2090)
* wip: Working on sockets, but can't connect? * simplify unix socket connection * wip: Get responses back from the server at least once. * WIP: Get the sockets working' * feat: Sockets can start/ stop/ config/ properites/ uninstall * fix: Restart services * Fix: Sockets work and can stop main and not kill client Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -11,7 +11,7 @@ use deno_core::{
|
||||
ModuleSpecifier, ModuleType, OpDecl, RuntimeOptions, Snapshot,
|
||||
};
|
||||
use embassy_container_init::ProcessGroupId;
|
||||
use helpers::{script_dir, spawn_local, RpcClient, Rsync};
|
||||
use helpers::{script_dir, spawn_local, Rsync, UnixRpcClient};
|
||||
use models::{PackageId, ProcedureName, Version, VolumeId};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
@@ -95,7 +95,7 @@ struct JsContext {
|
||||
input: Value,
|
||||
variable_args: Vec<serde_json::Value>,
|
||||
container_process_gid: ProcessGroupId,
|
||||
container_rpc_client: Option<Arc<RpcClient>>,
|
||||
container_rpc_client: Option<Arc<UnixRpcClient>>,
|
||||
rsyncs: Arc<Mutex<(usize, BTreeMap<usize, Rsync>)>>,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
|
||||
@@ -184,7 +184,7 @@ pub struct JsExecutionEnvironment {
|
||||
version: Version,
|
||||
volumes: Arc<dyn PathForVolumeId>,
|
||||
container_process_gid: ProcessGroupId,
|
||||
container_rpc_client: Option<Arc<RpcClient>>,
|
||||
container_rpc_client: Option<Arc<UnixRpcClient>>,
|
||||
}
|
||||
|
||||
impl JsExecutionEnvironment {
|
||||
@@ -194,7 +194,7 @@ impl JsExecutionEnvironment {
|
||||
version: &Version,
|
||||
volumes: Box<dyn PathForVolumeId>,
|
||||
container_process_gid: ProcessGroupId,
|
||||
container_rpc_client: Option<Arc<RpcClient>>,
|
||||
container_rpc_client: Option<Arc<UnixRpcClient>>,
|
||||
) -> Result<JsExecutionEnvironment, (JsError, String)> {
|
||||
let data_dir = data_directory.as_ref();
|
||||
let base_directory = data_dir;
|
||||
|
||||
Reference in New Issue
Block a user