DaemonInterfaceClient

Struct DaemonInterfaceClient 

Source
pub struct DaemonInterfaceClient<C = ZClientChannel<DaemonInterfaceRequest, DaemonInterfaceResponse>> { /* private fields */ }

Implementations§

Source§

impl DaemonInterfaceClient

Source

pub fn new(z: Arc<Session>, instance_id: ZenohId) -> DaemonInterfaceClient

Source

pub fn get_server_uuid(&self) -> ZenohId

Source

pub fn find_servers( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ZenohId>>> + 'static

Source

pub fn find_servers_info( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ComponentState>>> + 'static

Source

pub fn find_local_servers( z: Arc<Session>, ) -> impl Future<Output = ZRPCResult<Vec<ZenohId>>> + 'static

Source§

impl DaemonInterfaceClient

Source

pub fn verify_server(&self) -> impl Future<Output = ZRPCResult<bool>> + '_

Source

pub fn create_instance( &self, flow: FlattenDataFlowDescriptor, ) -> impl Future<Output = ZRPCResult<DaemonResult<Uuid>>> + '_

Creates an instance of the given FlattenDataFlowDescriptor1.

This function:

  1. Generates the instance Uuid
  2. Maps the flow into the infrastructure
  3. Creates the associated record
  4. Stores the record in Zenoh
  5. 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

  1. When the registry will be in place it will take the Flow identifier as parameter 

Source

pub fn delete_instance( &self, instance_id: Uuid, ) -> impl Future<Output = ZRPCResult<DaemonResult<DataFlowRecord>>> + '_

Deletes the given instance.

This function:

  1. Cleans the instance nodes from all the involved runtimes.
  2. 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
Source

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

  1. When the registry will be in place it will take the Flow identifier as parameter. 

Source

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
Source

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
Source

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
Source

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
Source

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>

Source§

fn clone(&self) -> DaemonInterfaceClient<C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug> Debug for DaemonInterfaceClient<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsNode<T> for T

Source§

fn as_node(&self) -> &T

Source§

impl<T> AsNodeMut<T> for T

Source§

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SendSyncAny for T
where T: 'static + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_mut_any(&mut self) -> &mut (dyn Any + 'static)

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,