Class: ZZQ::MonitorEvent

Inherits:
Data
  • Object
show all
Defined in:
lib/zzq/monitor_event.rb

Overview

A single event emitted by a Socket’s #monitor task. Event types cover both infrastructure lifecycle (:listening, :connected, :disconnected, :closed) and MQTT semantics (:session_resumed, :session_expired, :retained_updated, :publish_delivered, :will_published).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, endpoint: nil, detail: nil) ⇒ MonitorEvent

Returns a new instance of MonitorEvent.



10
11
12
# File 'lib/zzq/monitor_event.rb', line 10

def initialize(type:, endpoint: nil, detail: nil)
  super
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



9
10
11
# File 'lib/zzq/monitor_event.rb', line 9

def detail
  @detail
end

#endpointObject (readonly)

Returns the value of attribute endpoint

Returns:

  • (Object)

    the current value of endpoint



9
10
11
# File 'lib/zzq/monitor_event.rb', line 9

def endpoint
  @endpoint
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File 'lib/zzq/monitor_event.rb', line 9

def type
  @type
end