Struct sylvia_iot_data::routes::State
source · pub struct State {
pub scope_path: &'static str,
pub model: Arc<dyn Model>,
pub auth_base: String,
pub broker_base: String,
pub client: Client,
pub mq_conns: HashMap<String, Connection>,
pub data_receivers: HashMap<String, Queue>,
}
Expand description
The resources used by this service.
Fields§
§scope_path: &'static str
The scope root path for the service.
For example data
, the APIs are
http://host:port/data/api/v1/application-uldata/xxx
http://host:port/data/api/v1/network-uldata/xxx
model: Arc<dyn Model>
The database model.
auth_base: String
The sylvia-iot-auth base API path with host.
For example, http://localhost:1080/auth
.
broker_base: String
The sylvia-iot-broker base API path with host.
For example, http://localhost:2080/broker
.
client: Client
The client for internal HTTP requests.
mq_conns: HashMap<String, Connection>
Queue connections. Key is uri.
data_receivers: HashMap<String, Queue>
Data channel receivers. Key is data channel name such as broker.data
, coremgr.data
, …