service_mesh 0.4.4 → 0.5.0
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/README.md +3 -2
- data/lib/service_mesh/rspec.rb +6 -2
- data/lib/service_mesh/types.rb +4 -1
- data/lib/service_mesh/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edccbfa1e181934bed8df91ecb53d15849335cb10730450e088fee1e28ac44ef
|
|
4
|
+
data.tar.gz: 64cbe1ba2b464e7ccd1dc840066eedf2dd0cd4639804af86e0fde65615cf064c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bdff9e8e86405e3fcca5df769e800d317df47307d4974c88f9161728c165242ecfa7acf72880bfb41b2606f310c30a6fd6cf35dbb56d22dab202d27e1201725f
|
|
7
|
+
data.tar.gz: c3513ecbc6ae3832509419f8f3b9e9c93c637199eb6d8fd9b9183ef4046bf75d53dd3cc1cc73ee6d16dcaa2b116626956068ce3e3569404aba69bb90e0bc3e7a
|
data/README.md
CHANGED
|
@@ -23,8 +23,9 @@ Requires Ruby 3.3 or newer. The gem has no runtime dependencies.
|
|
|
23
23
|
raises `KindMismatch`.
|
|
24
24
|
- `Message#payload` is always `Encoding::BINARY`.
|
|
25
25
|
- `Target#same_channel?` compares segments and kind and ignores metadata.
|
|
26
|
-
- The configuration keys the specification defines
|
|
27
|
-
`CONSUMER_GROUP_KEY`,
|
|
26
|
+
- The configuration keys the specification defines. `DEPLOYMENT_GROUP_KEY` is runtime
|
|
27
|
+
configuration. `CONSUMER_GROUP_KEY`, with the value `CONSUMER_GROUP_NONE`, is `Endpoint` and
|
|
28
|
+
`Subscriber` metadata.
|
|
28
29
|
- The errors defined by the specification as `ServiceMesh::Error`: `ServiceMesh::KindMismatch`,
|
|
29
30
|
`ServiceMesh::InvalidTarget`, and `ServiceMesh::NoDeploymentGroup`.
|
|
30
31
|
- A conformance suite a transport runs against its own `Client` and
|
data/lib/service_mesh/rspec.rb
CHANGED
|
@@ -161,14 +161,18 @@ RSpec.shared_examples "a service mesh transport" do
|
|
|
161
161
|
end
|
|
162
162
|
end
|
|
163
163
|
|
|
164
|
-
it "
|
|
164
|
+
it "ignores a group set on the target, which carries none" do
|
|
165
165
|
count = Queue.new
|
|
166
166
|
%w[a b].each do |group|
|
|
167
167
|
t = ServiceMesh::Target.new(segments: topic_target.segments, kind: :topic, metadata: {ServiceMesh::CONSUMER_GROUP_KEY => group})
|
|
168
168
|
serve(config_for("same"), subscribers: [subscriber(t, ->(_) { count << true })])
|
|
169
169
|
end
|
|
170
|
+
|
|
170
171
|
client.publish(message(topic_target))
|
|
171
|
-
|
|
172
|
+
|
|
173
|
+
wait_until { count.size >= 1 }
|
|
174
|
+
sleep 0.1 # let an unwanted extra delivery show up
|
|
175
|
+
expect(count.size).to eq(1)
|
|
172
176
|
end
|
|
173
177
|
end
|
|
174
178
|
|
data/lib/service_mesh/types.rb
CHANGED
|
@@ -4,7 +4,10 @@ module ServiceMesh
|
|
|
4
4
|
KINDS = %i[route topic].freeze
|
|
5
5
|
|
|
6
6
|
# Configuration keys the specification defines. Everything else belongs to
|
|
7
|
-
# a transport.
|
|
7
|
+
# a transport. DEPLOYMENT_GROUP_KEY is runtime configuration, and nothing
|
|
8
|
+
# else carries it. CONSUMER_GROUP_KEY is Endpoint and Subscriber metadata;
|
|
9
|
+
# when it is unset or empty, the runtime's deployment group applies, and
|
|
10
|
+
# CONSUMER_GROUP_NONE means no group. A Target carries neither.
|
|
8
11
|
DEPLOYMENT_GROUP_KEY = "deployment_group"
|
|
9
12
|
CONSUMER_GROUP_KEY = "consumer_group"
|
|
10
13
|
CONSUMER_GROUP_NONE = "none"
|
data/lib/service_mesh/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: service_mesh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bryant Morrill
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-09-
|
|
12
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description:
|
|
15
15
|
email:
|