Commit 98d0e04
committed
Transport: Refactored the connection pool
This patch refactors the connection pool implementation to be cleaner and more aligned with the
architecture of other official clients.
It introduces the "Selector" component, which allows to customize the logic for selecting
connections from the pool without replacing the entire connection pool implementation.
It introduces the "ConnectionPoolFunc" configuration option, as a constructor function
to be used when initializing a custom connection pool implementation.
Many connection pool methods have been renamed to tighten up the semantics (eg. `Remove()` => `OnFailure()`, etc).
The support for client metrics has been refactored as well, to better support custom connection pool implementations.
Related: #95, #100
(cherry picked from commit dcd99f5)1 parent 39e4c99 commit 98d0e04
File tree
13 files changed
+550
-401
lines changed- _examples/instrumentation
- estransport
13 files changed
+550
-401
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
139 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
0 commit comments