pub struct ProductOSController { /* private fields */ }

Implementations§

source§

impl ProductOSController

source

pub fn new( configuration: Configuration, certificates: Certificates, key_value_store: Option<Arc<ProductOSKeyValueStore>> ) -> Self

source

pub fn get_registry(&self) -> &Registry

source

pub async fn discover_nodes(&mut self)

source

pub fn get_max_servers(&self) -> u8

source

pub fn upsert_node_local(&mut self, identifier: String, node: Node)

source

pub fn get_certificates(&self) -> Vec<&[u8]>

source

pub fn get_private_key(&self) -> &[u8]

source

pub fn get_certificates_and_private_key(&self) -> Certificates

source

pub fn validate_certificate(&self, certificate: Vec<u8>) -> bool

source

pub fn validate_verify_tag<T>( &self, query: Option<&BTreeMap<String, String>>, payload: Option<T>, headers: Option<&BTreeMap<String, String>>, verify_identifier: String, verify_tag: String ) -> bool
where T: AsByteVector,

source

pub fn authenticate_command_control<T>( &self, query: Option<&BTreeMap<String, String>>, payload: Option<T>, headers: Option<&BTreeMap<String, String>>, verify_identifier: Option<String>, verify_tag: Option<String> ) -> Result<bool, CommandControlAuthenticateError>
where T: AsByteVector,

source

pub fn search_and_prepare_command( &self, query: BTreeMap<String, String>, module: String, instruction: String, data: Option<Value> ) -> Result<Command, ProductOSRequestError>

source

pub fn find_and_prepare_command( &self, key: String, manager: String, instruction: String, data: Option<Value> ) -> Result<Command, ProductOSRequestError>

source

pub fn find_any_and_prepare_command( &self, capability: String, manager: String, instruction: String, data: Option<Value> ) -> Result<Command, ProductOSRequestError>

source

pub async fn find_kind_and_prepare_command( &self, kind: String, manager: String, instruction: String, data: Option<Value> ) -> Result<Command, ProductOSRequestError>

source

pub fn search_and_prepare_ask( &self, query: BTreeMap<String, String>, path: String, data: Option<Value>, headers: BTreeMap<String, String>, params: BTreeMap<String, String>, method: Method ) -> Result<Ask, ProductOSRequestError>

source

pub async fn find_feature_and_ask( &self, feature: String, path: String, data: Option<Value>, headers: BTreeMap<String, String>, params: BTreeMap<String, String>, method: Method ) -> Result<ProductOSResponse<BodyBytes>, ProductOSRequestError>

source

pub fn find_feature_and_prepare_ask( &self, feature: String, path: String, data: Option<Value>, headers: BTreeMap<String, String>, params: BTreeMap<String, String>, method: Method ) -> Result<Ask, ProductOSRequestError>

source

pub fn get_configuration(&self) -> Configuration

source

pub fn get_key(&self, identifier: String) -> Option<Vec<u8>>

source

pub fn create_key_session(&mut self) -> (String, [u8; 32])

source

pub fn generate_key( &mut self, session_identifier: String, remote_public_key: &[u8], association: String, remote_session_identifier: Option<String> )

source

pub fn get_key_value_store(&mut self) -> Arc<ProductOSKeyValueStore>

source

pub async fn add_feature( &mut self, feature: Arc<dyn Feature>, base_path: String, router: &mut ProductOSRouter )

source

pub async fn add_feature_mut( &mut self, feature: Arc<Mutex<dyn Feature>>, base_path: String, router: &mut ProductOSRouter )

source

pub async fn remove_feature(&mut self, identifier: String)

source

pub async fn add_service(&mut self, service: Arc<dyn Service>)

source

pub async fn add_service_mut(&mut self, service: Arc<Mutex<dyn Service>>)

source

pub async fn set_service_active(&mut self, identifier: String, status: bool)

source

pub async fn remove_service(&mut self, identifier: String)

source

pub async fn remove_inactive_services( &mut self, query: BTreeMap<String, String> )

source

pub async fn start_services(&mut self)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Any for T
where T: Any,

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CastSlice<'_, T> for T

source§

fn cast_slice(selves: &[T]) -> &[T]

source§

impl<T> CastSliceMut<'_, T> for T

source§

fn cast_slice_mut(selves: &mut [T]) -> &mut [T]

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more