summaryrefslogtreecommitdiff
path: root/src/mongo/executor/network_interface.h
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/executor/network_interface.h
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/executor/network_interface.h')
-rw-r--r--src/mongo/executor/network_interface.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/mongo/executor/network_interface.h b/src/mongo/executor/network_interface.h
index 1867a87e71c..799f473a12d 100644
--- a/src/mongo/executor/network_interface.h
+++ b/src/mongo/executor/network_interface.h
@@ -34,7 +34,6 @@
#include <string>
#include "mongo/bson/bsonobjbuilder.h"
-#include "mongo/client/async_client.h"
#include "mongo/executor/task_executor.h"
#include "mongo/transport/baton.h"
#include "mongo/util/fail_point.h"
@@ -253,46 +252,6 @@ public:
Milliseconds timeout,
Status status) = 0;
- /**
- * An RAII type that NetworkInterface uses to allow users to access a stream corresponding to a
- * single network-level (i.e. TCP, UDS) connection on which to run commands directly. Generally
- * speaking, users should use the NetworkInterface itself to run commands to take advantage of
- * connection-pooling, hedging, and other features - but for special cases where users need to
- * borrow their own network-stream for manual use, they can lease one through this type.
- * LeasedStreams are minimal and do not offer automated health-management/automated refreshing
- * while on lease - users are responsible for examining the health of the stream as-needed if
- * they desire. Users are also responsible for reporting on the health of stream before the
- * lease ends so that it can be subsequently re-used; see comments below for detail.
- */
- class LeasedStream {
- public:
- virtual ~LeasedStream() = default;
-
- // AsyncDBClient provides the mongoRPC-API for running commands over this stream. This
- // stream owns the AsyncDBClient and no outstanding networking should be scheduled on the
- // client when it is destroyed.
- virtual AsyncDBClient* getClient() = 0;
-
- // Indicates that the user is done with this leased stream, and no failures on it occured.
- // Users MUST call either this function or indicateFailure before the LeasedStream is
- // destroyed.
- virtual void indicateSuccess() = 0;
- // Indicates that the stream is unhealthy (i.e. the user received a network error indicating
- // the stream failed). This prevents the stream from being reused.
- virtual void indicateFailure(Status) = 0;
- // Indicates that the stream has successfully performed networking over the stream. Updates
- // metadata indicating the last healthy networking over the stream so that appropriate
- // health-checks can be done after the lease ends.
- virtual void indicateUsed() = 0;
- };
-
- /**
- * Lease a stream from this NetworkInterface for manual use.
- */
- virtual SemiFuture<std::unique_ptr<LeasedStream>> leaseStream(const HostAndPort& hostAndPort,
- transport::ConnectSSLMode sslMode,
- Milliseconds timeout) = 0;
-
protected:
NetworkInterface();
};