waterdrop 2.8.9 → 2.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/waterdrop/connection_pool.rb +10 -0
- data/lib/waterdrop/version.rb +1 -1
- data/lib/waterdrop.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ed8d57d7b79987870f918e97b3ffeee07c6c68b75a506bd11f29abe8778f21f
|
4
|
+
data.tar.gz: 86fe1bdb3d1963ef3783a254dbf0c7ae3ad61dc5608eeca5a41dcc2bbd454c1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22949a9ec65e4e6c0532ad469747989c4971de5320c705cf704371440b2d21b6edd83504eb77e56192ec0043c04334c91892813f3b1d01418e88d1f996064949
|
7
|
+
data.tar.gz: 9cecd0e2e56209d14eac2c896d9f2086973874de78e478e758404eb31d17e1b9abcf66e54011a1e9341dad215bac5de8fdafcc29ef38e0a6c8f43ca8eb82a301
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# WaterDrop changelog
|
2
2
|
|
3
|
+
## 2.8.10 (2025-09-25)
|
4
|
+
- [Enhancement] Add `#close` alias for `WaterDrop::ConnectionPool#shutdown` to align with producer API for consistent interface across both individual producers and connection pools.
|
5
|
+
- [Enhancement] Add `WaterDrop.monitor` method as the preferred alias for `WaterDrop.instrumentation` to align with per-producer API naming convention. The `instrumentation` method remains available as a deprecated alias for backward compatibility.
|
6
|
+
|
3
7
|
## 2.8.9 (2025-09-23)
|
4
8
|
- [Enhancement] Add connection pool lifecycle events to global instrumentation for improved observability. Events include `connection_pool.created`, `connection_pool.setup`, `connection_pool.shutdown`, `connection_pool.reload`, and `connection_pool.reloaded`.
|
5
9
|
- [Enhancement] Add default connection pool transactional direct API.
|
data/Gemfile.lock
CHANGED
@@ -126,6 +126,11 @@ module WaterDrop
|
|
126
126
|
)
|
127
127
|
end
|
128
128
|
|
129
|
+
# Alias for shutdown to align with producer API
|
130
|
+
# WaterDrop producers use #close, so we alias connection pool #shutdown to #close
|
131
|
+
# for API consistency across both individual producers and connection pools
|
132
|
+
alias close shutdown
|
133
|
+
|
129
134
|
# Reload the global connection pool
|
130
135
|
def reload
|
131
136
|
return unless @default_pool
|
@@ -244,6 +249,11 @@ module WaterDrop
|
|
244
249
|
)
|
245
250
|
end
|
246
251
|
|
252
|
+
# Alias for shutdown to align with producer API
|
253
|
+
# WaterDrop producers use #close, so we alias connection pool #shutdown to #close
|
254
|
+
# for API consistency across both individual producers and connection pools
|
255
|
+
alias close shutdown
|
256
|
+
|
247
257
|
# Reload all connections in the pool
|
248
258
|
# Useful for configuration changes or error recovery
|
249
259
|
def reload
|
data/lib/waterdrop/version.rb
CHANGED
data/lib/waterdrop.rb
CHANGED
@@ -17,7 +17,7 @@ module WaterDrop
|
|
17
17
|
Pathname.new(File.expand_path('..', __dir__))
|
18
18
|
end
|
19
19
|
|
20
|
-
# @return [WaterDrop::Instrumentation::ClassMonitor] global
|
20
|
+
# @return [WaterDrop::Instrumentation::ClassMonitor] global monitor for
|
21
21
|
# class-level event subscriptions. This allows external libraries to subscribe to WaterDrop
|
22
22
|
# lifecycle events without needing producer instance references.
|
23
23
|
#
|
@@ -25,13 +25,16 @@ module WaterDrop
|
|
25
25
|
# instance events
|
26
26
|
#
|
27
27
|
# @example Subscribe to producer creation events
|
28
|
-
# WaterDrop.
|
28
|
+
# WaterDrop.monitor.subscribe('producer.created') do |event|
|
29
29
|
# producer = event[:producer]
|
30
30
|
# # Configure producer or add middleware
|
31
31
|
# end
|
32
|
-
def
|
32
|
+
def monitor
|
33
33
|
@instrumentation ||= Instrumentation::ClassMonitor.new
|
34
34
|
end
|
35
|
+
|
36
|
+
# @deprecated Use #monitor instead. This method is provided for backward compatibility only.
|
37
|
+
alias instrumentation monitor
|
35
38
|
end
|
36
39
|
end
|
37
40
|
|