opendal/layers/
mod.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18//! `Layer` is the mechanism to intercept operations.
19
20mod type_eraser;
21pub(crate) use type_eraser::TypeEraseLayer;
22
23mod error_context;
24pub(crate) use error_context::ErrorContextLayer;
25
26mod complete;
27pub(crate) use complete::CompleteLayer;
28
29mod simulate;
30pub use simulate::SimulateLayer;
31
32mod concurrent_limit;
33pub use concurrent_limit::ConcurrentLimitLayer;
34
35mod immutable_index;
36pub use immutable_index::ImmutableIndexLayer;
37
38mod logging;
39pub use logging::LoggingInterceptor;
40pub use logging::LoggingLayer;
41
42mod timeout;
43pub use timeout::TimeoutLayer;
44
45#[cfg(feature = "layers-chaos")]
46mod chaos;
47#[cfg(feature = "layers-chaos")]
48pub use chaos::ChaosLayer;
49
50#[cfg(feature = "layers-metrics")]
51mod metrics;
52#[cfg(feature = "layers-metrics")]
53pub use self::metrics::MetricsLayer;
54
55#[cfg(feature = "layers-mime-guess")]
56mod mime_guess;
57#[cfg(feature = "layers-mime-guess")]
58pub use self::mime_guess::MimeGuessLayer;
59
60#[cfg(feature = "layers-prometheus")]
61mod prometheus;
62#[cfg(feature = "layers-prometheus")]
63pub use self::prometheus::PrometheusLayer;
64#[cfg(feature = "layers-prometheus")]
65pub use self::prometheus::PrometheusLayerBuilder;
66
67#[cfg(feature = "layers-prometheus-client")]
68mod prometheus_client;
69#[cfg(feature = "layers-prometheus-client")]
70pub use self::prometheus_client::PrometheusClientLayer;
71#[cfg(feature = "layers-prometheus-client")]
72pub use self::prometheus_client::PrometheusClientLayerBuilder;
73
74#[cfg(feature = "layers-fastmetrics")]
75mod fastmetrics;
76#[cfg(feature = "layers-fastmetrics")]
77pub use self::fastmetrics::FastmetricsLayer;
78#[cfg(feature = "layers-fastmetrics")]
79pub use self::fastmetrics::FastmetricsLayerBuilder;
80
81mod retry;
82pub use self::retry::RetryInterceptor;
83pub use self::retry::RetryLayer;
84
85mod tail_cut;
86pub use self::tail_cut::TailCutLayer;
87pub use self::tail_cut::TailCutLayerBuilder;
88
89#[cfg(feature = "layers-tracing")]
90mod tracing;
91#[cfg(feature = "layers-tracing")]
92pub use self::tracing::TracingLayer;
93
94#[cfg(feature = "layers-fastrace")]
95mod fastrace;
96#[cfg(feature = "layers-fastrace")]
97pub use self::fastrace::FastraceLayer;
98
99#[cfg(feature = "layers-otel-metrics")]
100mod otelmetrics;
101#[cfg(feature = "layers-otel-metrics")]
102pub use self::otelmetrics::OtelMetricsLayer;
103
104#[cfg(feature = "layers-otel-trace")]
105mod oteltrace;
106#[cfg(feature = "layers-otel-trace")]
107pub use self::oteltrace::OtelTraceLayer;
108
109#[cfg(feature = "layers-throttle")]
110mod throttle;
111#[cfg(feature = "layers-throttle")]
112pub use self::throttle::ThrottleLayer;
113
114#[cfg(feature = "layers-await-tree")]
115mod await_tree;
116#[cfg(feature = "layers-await-tree")]
117pub use self::await_tree::AwaitTreeLayer;
118
119#[cfg(feature = "layers-async-backtrace")]
120mod async_backtrace;
121#[cfg(feature = "layers-async-backtrace")]
122pub use self::async_backtrace::AsyncBacktraceLayer;
123
124#[cfg(all(target_os = "linux", feature = "layers-dtrace"))]
125mod dtrace;
126#[cfg(all(target_os = "linux", feature = "layers-dtrace"))]
127pub use self::dtrace::DtraceLayer;
128
129pub mod observe;
130
131mod correctness_check;
132pub(crate) use correctness_check::CorrectnessCheckLayer;
133mod capability_check;
134pub use capability_check::CapabilityCheckLayer;
135
136mod http_client;
137pub use http_client::HttpClientLayer;