Expand description
Layers enabled through layers-* Cargo features.
A layer adds cross-service behavior to an Operator. Enable the matching
facade feature, construct the layer, and pass it to Operator::layer.
Layer order is observable, so review each layer’s composition notes when
combining retries, timeouts, caching, or observability.
Structs§
- Async
Backtrace Layer layers-async-backtrace AsyncBacktraceLayerrecords efficient logical stack traces for asynchronous service operations.- Await
Tree Layer layers-await-tree AwaitTreeLayerinstruments service operations for actor-based applications.- Capability
Check Layer layers-capability-check CapabilityCheckLayervalidates optional operation arguments against service capabilities.- Capability
Override Layer - Layer for overriding an operator’s effective capability.
- Chaos
Layer layers-chaos ChaosLayerinjects errors into services to test robustness.- Concurrent
Limit Layer layers-concurrent-limit ConcurrentLimitLayercontrols how many concurrent requests OpenDAL can send to a storage service.- Default
Logging Interceptor layers-logging - The DefaultLoggingInterceptor will log the message by the standard logging macro.
- Default
Retry Interceptor layers-retry - The DefaultRetryInterceptor logs each retry error at warn level.
- Dtrace
Layer Linux and layers-dtrace DtraceLayersupports User Statically-Defined Tracing (USDT) on Linux.- Fastmetrics
Layer layers-fastmetrics FastmetricsLayerrecords OpenDAL operation and HTTP fetch metrics with fastmetrics.- Fastmetrics
Layer Builder layers-fastmetrics FastmetricsLayerBuilderis a config builder to build aFastmetricsLayer.- Fastrace
Layer layers-fastrace FastraceLayertraces every operation with fastrace.- Foyer
Key layers-foyer FoyerKeyis a key for the foyer cache. It implements foyer’s [Code] trait directly, so the layer does not depend on foyer’sserdefeature (and its bincode dependency).- Foyer
Layer layers-foyer FoyerLayercaches OpenDAL data with foyer.- Foyer
Value layers-foyer FoyerValuestores buffered object data in Foyer.- Hotpath
Layer layers-hotpath HotpathLayerprofiles every operation with hotpath.- Immutable
Index Layer layers-immutable-index ImmutableIndexLayeradds an immutable in-memory index to a storage service.- Logging
Layer layers-logging LoggingLayerrecords every operation with log.- Metrics
Layer layers-metrics MetricsLayerrecords every operation with metrics.- Mime
Guess Layer layers-mime-guess MimeGuessLayersetsContent-Typefrom a path’s file extension.- Otel
Metrics Layer layers-otel-metrics OtelMetricsLayerrecords OpenDAL operation and HTTP fetch metrics with [opentelemetry::metrics].- Otel
Metrics Layer Builder layers-otel-metrics OtelMetricsLayerBuilderis a config builder to build aOtelMetricsLayer.- Otel
Trace Layer layers-otel-trace OtelTraceLayertraces OpenDAL operations with OpenTelemetry.- Prometheus
Client Layer layers-prometheus-client PrometheusClientLayerrecords OpenDAL operation and HTTP fetch metrics with prometheus-client.- Prometheus
Client Layer Builder layers-prometheus-client PrometheusClientLayerBuilderis a config builder to build aPrometheusClientLayer.- Prometheus
Layer layers-prometheus PrometheusLayerrecords OpenDAL operation and HTTP fetch metrics with prometheus.- Prometheus
Layer Builder layers-prometheus PrometheusLayerBuilderis a config builder to build aPrometheusLayer.- Retry
Event layers-retry - Context passed to
RetryInterceptorbefore each retry sleep. - Retry
Layer layers-retry RetryLayerretries temporarily failed operations.- Route
Layer layers-route RouteLayerroutes operations to different operators by matching paths against glob patterns.- Route
Layer Builder layers-route - Builder for
RouteLayer. - Simulate
Layer - Simulate missing capabilities for backends in a configurable way.
- Tail
CutLayer layers-tail-cut TailCutLayermonitors request latency and cancels requests that run significantly slower than the historical baseline (for example, slower than P95).- Tail
CutLayer Builder layers-tail-cut - Builder for TailCutLayer.
- Throttle
Layer layers-throttle ThrottleLayerlimits bandwidth for storage services.- Timeout
Layer layers-timeout TimeoutLayeradds deadlines to operations so slow or stalled work cannot hang indefinitely.- Tracing
Layer layers-tracing TracingLayertraces every operation with tracing.
Traits§
- Concurrent
Limit Semaphore layers-concurrent-limit - ConcurrentLimitSemaphore abstracts a semaphore-like concurrency primitive that yields an owned permit released on drop.
- Logging
Interceptor layers-logging - LoggingInterceptor customizes log emission.
- Retry
Interceptor layers-retry - RetryInterceptor observes retry attempts before the retry sleep.