Struct opendal::layers::ConcurrentLimitLayer
source · pub struct ConcurrentLimitLayer { /* private fields */ }
Expand description
Add concurrent request limit.
Notes
Users can control how many concurrent connections could be established between OpenDAL and underlying storage services.
Examples
use anyhow::Result;
use opendal::layers::ConcurrentLimitLayer;
use opendal::services;
use opendal::Operator;
use opendal::Scheme;
let _ = Operator::new(services::Memory::default())
.expect("must init")
.layer(ConcurrentLimitLayer::new(1024))
.finish();
Implementations§
Trait Implementations§
source§impl<A: Accessor> Layer<A> for ConcurrentLimitLayer
impl<A: Accessor> Layer<A> for ConcurrentLimitLayer
§type LayeredAccessor = ConcurrentLimitAccessor<A>
type LayeredAccessor = ConcurrentLimitAccessor<A>
The layered accessor that return by this layer.
source§fn layer(&self, inner: A) -> Self::LayeredAccessor
fn layer(&self, inner: A) -> Self::LayeredAccessor
Intercept the operations on the underlying storage.