Expose managed agents in PubRelay

parent 7ba35d78
......@@ -7,6 +7,10 @@ require "earl"
class PubRelay < Earl::Supervisor
VERSION = "0.1.0"
getter stats : Stats
getter subscription_manager : SubscriptionManager
getter web_server : WebServer
def initialize(
domain : String,
private_key : OpenSSL::RSA,
......@@ -16,14 +20,13 @@ class PubRelay < Earl::Supervisor
)
super()
stats = Stats.new
monitor(stats)
subscription_manager = SubscriptionManager.new(domain, private_key, redis, stats)
monitor(subscription_manager)
@stats = Stats.new
@subscription_manager = SubscriptionManager.new(domain, private_key, redis, stats)
@web_server = WebServer.new(domain, private_key, subscription_manager, bindhost, port, stats)
web_server = WebServer.new(domain, private_key, subscription_manager, bindhost, port, stats)
monitor(web_server)
monitor(@stats)
monitor(@subscription_manager)
monitor(@web_server)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment