reactive_graph_client/client/runtime/
mod.rs1use std::sync::Arc;
2
3use crate::client::ReactiveGraphClient;
4use crate::client::plugin::api::Plugins;
5use crate::client::runtime::instance::api::Instance;
6use crate::client::runtime::remotes::api::Remotes;
7use crate::client::runtime::shutdown::api::Shutdown;
8use command::api::Command;
9
10pub mod command;
11pub mod instance;
12pub mod remotes;
13pub mod shutdown;
14
15pub struct Runtime {
16 client: Arc<ReactiveGraphClient>,
17}
18
19impl Runtime {
20 pub fn new(client: Arc<ReactiveGraphClient>) -> Self {
21 Self { client }
22 }
23
24 pub fn command(&self) -> Command {
25 Command::new(self.client.clone())
26 }
27
28 pub fn plugins(&self) -> Plugins {
29 Plugins::new(self.client.clone())
30 }
31
32 pub fn remotes(&self) -> Remotes {
33 Remotes::new(self.client.clone())
34 }
35
36 pub fn instance(&self) -> Instance {
37 Instance::new(self.client.clone())
38 }
39
40 pub fn shutdown(&self) -> Shutdown {
41 Shutdown::new(self.client.clone())
42 }
43}