pub fn init_middleware<M>(
node_id: String,
max_retries: Option<u32>,
consent_timeout: u64,
m2m_client: M,
enable_resource_validation: bool,
) -> (M2mApiDefaultStack, P2mApiDefaultStack<M>, O2mApiDefaultStack)where
M: Service<M2mRequest, Response = M2mResponse, Error = TraceabilityError> + Clone + Send + 'static,
M::Future: Send,
Expand description
Initialize a complete middleware stack for production deployment.
Creates a fully configured middleware stack with all three API services (M2M, P2M, O2M) using default component configurations. This is the standard initialization method for production deployments.
§Arguments
node_id
- Unique identifier for this middleware node in the distributed systemmax_retries
- Maximum retry attempts for the waiting queue (None for unlimited)m2m_client
- Client service for M2M communication with remote middlewareenable_resource_validation
- Whether to enable resource validation for P2M requests
§Returns
A tuple containing (M2M service, P2M service, O2M service) ready for use
§Type Parameters
M
- M2M client type that implements the required service traits