Expand description
The tosca-controller library crate provides a set of APIs for managing,
orchestrating, and interacting with all tosca devices within a
network.
A device is considered compliant with tosca if its firmware is built
using the APIs of the tosca framework designed for the device’s underlying
hardware architecture.
Core functionalities of this crate include:
- Discovering all devices within the network that are compliant with the
toscaarchitecture - Constructing and sending
RESTrequests totoscadevices to trigger their tasks - Defining privacy policies to allow or block requests to a device
- Intercepting device events by subscribing to the brokers where they are published
To optimize system resource usage, tosca-controller leverages tokio as
an asynchronous executor, allowing concurrent execution of independent
tasks. This approach improves performance, especially when running on
multi-threaded systems, where tasks are distributed across
multiple threads for additional efficiency.
Modules§
- controller
- A controller for interacting with
toscadevices. - device
- Device data along with its associated methods.
- discovery
- A service for discovering all
toscadevices within a network. - error
- Error management.
- events
- All events data.
- policy
- A privacy policy manager that blocks or allows the requests to devices based on a set of privacy rules.
- request
- Request data and the associated methods.
- response
- All supported methods and data for handling
toscadevice responses.