pub struct DaemonInterfaceClient<C = ZClientChannel<DaemonInterfaceRequest, DaemonInterfaceResponse>> { /* private fields */ }Implementations§
Source§impl DaemonInterfaceClient
impl DaemonInterfaceClient
pub fn new(z: Arc<Session>, instance_id: ZenohId) -> DaemonInterfaceClient
pub fn get_server_uuid(&self) -> ZenohId
pub fn find_servers( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ZenohId>>> + 'static
pub fn find_servers_info( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ComponentState>>> + 'static
pub fn find_local_servers( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ZenohId>>> + 'static
Source§impl DaemonInterfaceClient
impl DaemonInterfaceClient
pub fn verify_server(&self) -> impl Future<Output = ZRPCResult<bool>> + '_
Sourcepub fn create_instance(
&self,
flow: FlattenDataFlowDescriptor,
) -> impl Future<Output = ZRPCResult<DaemonResult<Uuid>>> + '_
pub fn create_instance( &self, flow: FlattenDataFlowDescriptor, ) -> impl Future<Output = ZRPCResult<DaemonResult<Uuid>>> + '_
Creates an instance of the given FlattenDataFlowDescriptor1.
This function:
- Generates the instance
Uuid - Maps the flow into the infrastructure
- Creates the associated record
- Stores the record in Zenoh
- Prepares all the involved runtimes to host the data flow instance
Returns the Uuid associated with the instance.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- unable to map
- unable to prepare nodes
When the registry will be in place it will take the Flow identifier as parameter ↩
Sourcepub fn delete_instance(
&self,
instance_id: Uuid,
) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
pub fn delete_instance( &self, instance_id: Uuid, ) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
Deletes the given instance.
This function:
- Cleans the instance nodes from all the involved runtimes.
- Deletes the record from zenoh
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- instance not stopped
- unable to clean
- zenoh error
Sourcepub fn instantiate(
&self,
flow: FlattenDataFlowDescriptor,
) -> impl Future<Output = ZRPCResult<DaemonResult<Uuid>>> + '_
pub fn instantiate( &self, flow: FlattenDataFlowDescriptor, ) -> impl Future<Output = ZRPCResult<DaemonResult<Uuid>>> + '_
Instantiates the given FlattenDataFlowDescriptor1.
The instance contains an Uuid that identifies it uniquely.
The actual instantiation process runs asynchronously in the runtime.
Returns the Uuid associated with the instance.
It is equivalent to calling create_instance and then start_instance.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- unable to instantiate
When the registry will be in place it will take the Flow identifier as parameter. ↩
Sourcepub fn teardown(
&self,
instance_id: Uuid,
) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
pub fn teardown( &self, instance_id: Uuid, ) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
Sends a teardown request for the given instance identified by the Uuid.
Note that the request is asynchronous, the runtime that receives the request will return immediately, but the teardown process will run asynchronously in the runtime.
It is equivalent to calling stop_instance and then delete_instance.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- unable to teardown
- instance not found
Sourcepub fn start_instance(
&self,
instance_id: Uuid,
) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
pub fn start_instance( &self, instance_id: Uuid, ) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
Starts the instance on all involved nodes.
It first starts all the nodes and then the sources.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- instance not found
- instance already started
Sourcepub fn stop_instance(
&self,
instance_id: Uuid,
) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
pub fn stop_instance( &self, instance_id: Uuid, ) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_
Stops the instance on all involved nodes.
It first stops the sources then the other nodes.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- unable to clean
Sourcepub fn start_node(
&self,
instance_id: Uuid,
node: String,
) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
pub fn start_node( &self, instance_id: Uuid, node: String, ) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
Starts the given graph node for the given instance. A graph node can be a source, a sink, a connector, or an operator.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- record not found
- node already started
- node not found
Sourcepub fn stop_node(
&self,
instance_id: Uuid,
node: String,
) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
pub fn stop_node( &self, instance_id: Uuid, node: String, ) -> impl Future<Output = ZRPCResult<DaemonResult<()>>> + '_
Stops the given graph node from the given instance. A graph node can be a source, a sink, a connector, or an operator.
§Errors
An error variant is returned in case of:
- error on zenoh-rpc
- instance not found
- node not found
- node already stopped
Trait Implementations§
Source§impl<C: Clone> Clone for DaemonInterfaceClient<C>
impl<C: Clone> Clone for DaemonInterfaceClient<C>
Source§fn clone(&self) -> DaemonInterfaceClient<C>
fn clone(&self) -> DaemonInterfaceClient<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<C> Freeze for DaemonInterfaceClient<C>where
C: Freeze,
impl<C> RefUnwindSafe for DaemonInterfaceClient<C>where
C: RefUnwindSafe,
impl<C> Send for DaemonInterfaceClient<C>where
C: Send,
impl<C> Sync for DaemonInterfaceClient<C>where
C: Sync,
impl<C> Unpin for DaemonInterfaceClient<C>where
C: Unpin,
impl<C> UnwindSafe for DaemonInterfaceClient<C>where
C: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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