async-service-supervisor-envoy 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15171bea49a1422dc4ef04dc7f04f904dcc28e050e97365d905c15348e19877d
4
- data.tar.gz: 9ccfbff50bda3608571165db4dc9b12f46668cb1b84063d8515ef0f7f3059157
3
+ metadata.gz: d51f4a0841888cdb84d1d321b67202fdeab2aaba77bc54e3dbcb856d57658406
4
+ data.tar.gz: feea549ad0b41d010cad21f9375159bd3e43c2cb97c9314172f9288e697048cb
5
5
  SHA512:
6
- metadata.gz: e8ea8643b3ae68cdb1e318e2dbae4a3b51d8c3609b7e6c1f73713828c7c76aa9539a586f810e2a91371a39b766da44471fee0b66cb22d9dcdc66d3fce7f91bfd
7
- data.tar.gz: 593ec4b29fd5b582b8727fcf18552263bc286666348de95bb43dcd772e283413c28a2fdc6801d6759791266efb5253ea4f29d494aa78ea3affe922b64fd70f94
6
+ metadata.gz: 2cfa5c93b3e1090d045e5087ad70931c539b37d607aff20de1bab17625078dd728f0312fba050a7e9158fc4aed8bfb3e8b93863ce4b00c2fd552e20d09173317
7
+ data.tar.gz: e8008adf78279955e66f6852ce111bb2c451a377cbddf6f51ab2bbea0f1f51d91b2bdfce2420738eaf0e77e601a1ea282ff6ad105abfaadb31a0774d902ea960
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2026, by Samuel Williams.
5
+
6
+ # Get the running Envoy monitor status from the supervisor.
7
+ def status
8
+ envoy_status
9
+ end
10
+
11
+ # Get the clusters currently published by the running Envoy monitor.
12
+ def clusters
13
+ fetch_clusters
14
+ end
15
+
16
+ # Get a compact endpoint list from the running Envoy monitor.
17
+ def endpoints
18
+ fetch_clusters.flat_map do |cluster, entries|
19
+ entries.map do |entry|
20
+ entry.merge(cluster: cluster)
21
+ end
22
+ end
23
+ end
24
+
25
+ private
26
+
27
+ def supervisor_status
28
+ context["async:service:supervisor:status"].call
29
+ end
30
+
31
+ def envoy_status
32
+ status = supervisor_status
33
+ monitor = status.find do |entry|
34
+ entry[:type] == "Async::Service::Supervisor::Envoy::Monitor"
35
+ end
36
+
37
+ unless monitor
38
+ raise "No Async::Service::Supervisor::Envoy::Monitor status found."
39
+ end
40
+
41
+ monitor
42
+ end
43
+
44
+ def fetch_clusters
45
+ status = envoy_status
46
+ status.fetch(:data).fetch(:clusters)
47
+ end
@@ -28,6 +28,7 @@ module Async
28
28
  # @parameter bind [String | Nil] The optional address for the xDS control plane server.
29
29
  # @parameter delegate [Delegate] The delegate used to map supervisor state into Envoy endpoints.
30
30
  # @parameter control_plane [Async::GRPC::XDS::ControlPlane] The xDS control plane to update.
31
+ # @parameter health_checks [Array(Envoy::Config::Core::V3::HealthCheck)] The active health checks applied to published clusters.
31
32
  # @parameter orca [Boolean] Whether to collect and serve per-worker ORCA load reports.
32
33
  # @parameter processor [Process::Metrics::Processor | Nil] The optional process CPU sampler.
33
34
  # @parameter utilization_monitor [Async::Service::Supervisor::UtilizationMonitor | Nil] The per-worker utilization monitor used for ORCA reporting.
@@ -36,6 +37,7 @@ module Async
36
37
  bind: nil,
37
38
  delegate: Delegate.new,
38
39
  control_plane: Async::GRPC::XDS::ControlPlane.new,
40
+ health_checks: [],
39
41
  orca: false,
40
42
  processor: nil,
41
43
  utilization_monitor: nil,
@@ -47,6 +49,7 @@ module Async
47
49
  @bind = bind
48
50
  @delegate = delegate
49
51
  @control_plane = control_plane
52
+ @health_checks = health_checks
50
53
  @interval = interval
51
54
  @orca = orca
52
55
  @controllers = {}
@@ -243,7 +246,10 @@ module Async
243
246
  raise ArgumentError, "Envoy cluster contains no common protocols: #{protocols.inspect}" if common_protocols.empty?
244
247
  raise ArgumentError, "HTTPS upstream endpoints are not yet supported!" if schemes.first == :https
245
248
 
246
- configuration = {protocol: envoy_protocol(common_protocols)}
249
+ configuration = {
250
+ protocol: envoy_protocol(common_protocols),
251
+ health_checks: @health_checks,
252
+ }
247
253
 
248
254
  if @orca
249
255
  if records.any?{|record| record[:endpoint].addresses.any?{|address| address[:path]}}
@@ -11,7 +11,7 @@ module Async
11
11
  module Supervisor
12
12
  # @namespace
13
13
  module Envoy
14
- VERSION = "0.3.0"
14
+ VERSION = "0.4.0"
15
15
  end
16
16
  end
17
17
  end
data/readme.md CHANGED
@@ -25,6 +25,14 @@ Please see the [project documentation](https://socketry.github.io/async-service-
25
25
 
26
26
  Please see the [project releases](https://socketry.github.io/async-service-supervisor-envoy/releases/index) for all releases.
27
27
 
28
+ ### v0.4.0
29
+
30
+ - Publish configured active health checks with Envoy clusters.
31
+
32
+ ### v0.3.1
33
+
34
+ - Add Bake tasks for inspecting Envoy monitor status, clusters, and endpoints.
35
+
28
36
  ### v0.3.0
29
37
 
30
38
  - Add supervisor-driven out-of-band ORCA load reporting for independently addressable workers.
@@ -43,10 +51,6 @@ Please see the [project releases](https://socketry.github.io/async-service-super
43
51
  - Publish grouped IP and Unix-domain-socket endpoint addresses to Envoy.
44
52
  - Configure generated clusters from each endpoint's supported HTTP protocol names.
45
53
 
46
- ### v0.1.0
47
-
48
- - Deduplicate immutable endpoint values reported by multiple supervised workers and aggregate their health.
49
-
50
54
  ## See Also
51
55
 
52
56
  - [async-service-supervisor](https://github.com/socketry/async-service-supervisor) - Supervisor for managed Async service workers.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.4.0
4
+
5
+ - Publish configured active health checks with Envoy clusters.
6
+
7
+ ## v0.3.1
8
+
9
+ - Add Bake tasks for inspecting Envoy monitor status, clusters, and endpoints.
10
+
3
11
  ## v0.3.0
4
12
 
5
13
  - Add supervisor-driven out-of-band ORCA load reporting for independently addressable workers.
@@ -17,7 +25,3 @@
17
25
  - Register concrete Falcon cluster listeners as Envoy upstream endpoint state after binding.
18
26
  - Publish grouped IP and Unix-domain-socket endpoint addresses to Envoy.
19
27
  - Configure generated clusters from each endpoint's supported HTTP protocol names.
20
-
21
- ## v0.1.0
22
-
23
- - Initial release.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-service-supervisor-envoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.2'
61
+ version: '0.3'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.2'
68
+ version: '0.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: async-http
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -112,6 +112,7 @@ executables: []
112
112
  extensions: []
113
113
  extra_rdoc_files: []
114
114
  files:
115
+ - bake/async/service/supervisor/envoy.rb
115
116
  - code.md
116
117
  - context/getting-started.md
117
118
  - context/index.yaml
metadata.gz.sig CHANGED
Binary file