Class: Aikido::Zen::Events::Heartbeat
- Inherits:
-
Aikido::Zen::Event
- Object
- Aikido::Zen::Event
- Aikido::Zen::Events::Heartbeat
- Defined in:
- lib/aikido/zen/event.rb
Instance Attribute Summary
Attributes inherited from Aikido::Zen::Event
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(stats:, users:, hosts:, routes:, middleware_installed:, **opts) ⇒ Heartbeat
constructor
A new instance of Heartbeat.
Constructor Details
#initialize(stats:, users:, hosts:, routes:, middleware_installed:, **opts) ⇒ Heartbeat
Returns a new instance of Heartbeat.
53 54 55 56 57 58 59 60 |
# File 'lib/aikido/zen/event.rb', line 53 def initialize(stats:, users:, hosts:, routes:, middleware_installed:, **opts) super(type: "heartbeat", **opts) @stats = stats @users = users @hosts = hosts @routes = routes @middleware_installed = middleware_installed end |
Instance Method Details
#as_json ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'lib/aikido/zen/event.rb', line 62 def as_json super.update( "stats" => @stats.as_json, "users" => @users.as_json, "routes" => @routes.as_json, "hostnames" => @hosts.as_json, "middlewareInstalled" => @middleware_installed ) end |