Function tower_abci::v034::split::service

source ·
pub fn service<S>(
    service: S,
    bound: usize
) -> (Consensus<S>, Mempool<S>, Snapshot<S>, Info<S>)
where S: Service<Request, Response = Response, Error = BoxError> + Send + 'static, S::Future: Send + 'static,
Expand description

Splits a single service implementing all of ABCI into four cloneable component services, each implementing one category of ABCI requests. See the module documentation for details.

The bound parameter bounds the size of each component’s request queue. For the same reason as in Tower’s Buffer middleware, it’s advisable to set the bound to be at least the number of concurrent requests to the component services. However, large buffers hide backpressure from propagating to the caller.