|
1 | 1 | //! Runtime transport that connects on first request, which can take either of an HTTP,
|
2 |
| -//! WebSocket, or IPC transport and supports retries based on CUPS logic. |
| 2 | +//! WebSocket, or IPC transport. Retries are handled by a client layer (e.g., |
| 3 | +//! `RetryBackoffLayer`) when used. |
3 | 4 |
|
4 | 5 | use crate::{DEFAULT_USER_AGENT, REQUEST_TIMEOUT};
|
5 | 6 | use alloy_json_rpc::{RequestPacket, ResponsePacket};
|
@@ -67,7 +68,8 @@ pub enum RuntimeTransportError {
|
67 | 68 | /// A runtime transport is a custom [`alloy_transport::Transport`] that only connects when the
|
68 | 69 | /// *first* request is made. When the first request is made, it will connect to the runtime using
|
69 | 70 | /// either an HTTP WebSocket, or IPC transport depending on the URL used.
|
70 |
| -/// It also supports retries for rate-limiting and timeout-related errors. |
| 71 | +/// Retries for rate-limiting and timeout-related errors are handled by an external |
| 72 | +/// client layer (e.g., `RetryBackoffLayer`) when configured. |
71 | 73 | #[derive(Clone, Debug, Error)]
|
72 | 74 | pub struct RuntimeTransport {
|
73 | 75 | /// The inner actual transport used.
|
@@ -239,8 +241,8 @@ impl RuntimeTransport {
|
239 | 241 |
|
240 | 242 | /// Sends a request using the underlying transport.
|
241 | 243 | /// If this is the first request, it will connect to the appropriate transport depending on the
|
242 |
| - /// URL scheme. When sending the request, retries will be automatically handled depending |
243 |
| - /// on the parameters set on the [RuntimeTransport]. |
| 244 | + /// URL scheme. Retries are performed by an external client layer (e.g., `RetryBackoffLayer`), |
| 245 | + /// if such a layer is configured by the caller. |
244 | 246 | /// For sending the actual request, this action is delegated down to the
|
245 | 247 | /// underlying transport through Tower's [tower::Service::call]. See tower's [tower::Service]
|
246 | 248 | /// trait for more information.
|
|
0 commit comments