pub struct ProductOSController { /* private fields */ }
Implementations§
Source§impl ProductOSController
impl ProductOSController
pub fn new( configuration: Configuration, certificates: Certificates, key_value_store: Option<Arc<ProductOSKeyValueStore>>, ) -> Self
pub fn get_registry(&self) -> &Registry
pub async fn discover_nodes(&mut self)
pub fn get_max_servers(&self) -> u8
pub fn upsert_node_local(&mut self, identifier: String, node: Node)
pub fn get_certificates(&self) -> Vec<&[u8]>
pub fn get_private_key(&self) -> &[u8] ⓘ
pub fn get_certificates_and_private_key(&self) -> Certificates
pub fn validate_certificate(&self, certificate: &[u8]) -> bool
pub fn validate_verify_tag<T>(
&self,
query: Option<&BTreeMap<String, String>>,
payload: Option<T>,
headers: Option<&BTreeMap<String, String>>,
verify_identifier: &str,
verify_tag: &str,
) -> boolwhere
T: AsByteVector,
pub fn authenticate_command_control<T>(
&self,
query: Option<&BTreeMap<String, String>>,
payload: Option<T>,
headers: Option<&BTreeMap<String, String>>,
verify_identifier: Option<&str>,
verify_tag: Option<&str>,
) -> Result<bool, CommandControlAuthenticateError>where
T: AsByteVector,
pub fn search_and_prepare_command( &self, query: BTreeMap<&str, &str>, module: String, instruction: String, data: Option<Value>, ) -> Result<Command, ProductOSRequestError>
pub fn find_and_prepare_command( &self, key: &str, manager: &str, instruction: String, data: Option<Value>, ) -> Result<Command, ProductOSRequestError>
pub fn find_any_and_prepare_command( &self, capability: &str, manager: &str, instruction: &str, data: Option<Value>, ) -> Result<Command, ProductOSRequestError>
pub async fn find_kind_and_prepare_command( &self, kind: &str, manager: &str, instruction: &str, data: Option<Value>, ) -> Result<Command, ProductOSRequestError>
pub fn search_and_prepare_ask( &self, query: BTreeMap<&str, &str>, path: &str, data: Option<Value>, headers: BTreeMap<String, String>, params: BTreeMap<String, String>, method: Method, ) -> Result<Ask, ProductOSRequestError>
pub async fn find_feature_and_ask( &self, feature: &str, path: &str, data: &Option<Value>, headers: &BTreeMap<String, String>, params: &BTreeMap<String, String>, method: &Method, ) -> Result<ProductOSResponse<BodyBytes>, ProductOSRequestError>
pub fn find_feature_and_prepare_ask( &self, feature: &str, path: &str, data: Option<Value>, headers: BTreeMap<String, String>, params: BTreeMap<String, String>, method: Method, ) -> Result<Ask, ProductOSRequestError>
pub fn get_configuration(&self) -> Configuration
pub fn get_key(&self, identifier: &str) -> Option<Vec<u8>>
pub fn create_key_session(&mut self) -> (String, [u8; 32])
pub fn generate_key( &mut self, session_identifier: &str, remote_public_key: &[u8], association: String, remote_session_identifier: Option<String>, )
pub fn get_key_value_store(&mut self) -> Arc<ProductOSKeyValueStore>
pub async fn add_feature( &mut self, feature: Arc<dyn Feature>, base_path: String, router: &mut ProductOSRouter, )
pub async fn add_feature_mut( &mut self, feature: Arc<Mutex<dyn Feature>>, base_path: String, router: &mut ProductOSRouter, )
pub async fn remove_feature(&mut self, identifier: &str)
pub async fn add_service(&mut self, service: Arc<dyn Service>)
pub async fn add_service_mut(&mut self, service: Arc<Mutex<dyn Service>>)
pub async fn set_service_active(&mut self, identifier: String, status: bool)
pub async fn remove_service(&mut self, identifier: &str)
pub async fn remove_inactive_services(&mut self, query: BTreeMap<&str, &str>)
pub async fn start_services(&mut self) -> Result<(), ()>
pub async fn start_service(&mut self, identifier: &str) -> Result<(), ()>
pub async fn stop_service(&mut self, identifier: &str) -> Result<(), ()>
Auto Trait Implementations§
impl !Freeze for ProductOSController
impl !RefUnwindSafe for ProductOSController
impl Send for ProductOSController
impl Sync for ProductOSController
impl Unpin for ProductOSController
impl !UnwindSafe for ProductOSController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more