Class: OMQ::MonitorEvent

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

Overview

Lifecycle event emitted by Socket#monitor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of MonitorEvent.



14
# File 'lib/omq/monitor_event.rb', line 14

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

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



13
14
15
# File 'lib/omq/monitor_event.rb', line 13

MonitorEvent = Data.define(:type, :endpoint, :detail) do
  def initialize(type:, endpoint: nil, detail: nil) = super
end

#endpointObject (readonly)

Returns the value of attribute endpoint

Returns:

  • (Object)

    the current value of endpoint



13
14
15
# File 'lib/omq/monitor_event.rb', line 13

MonitorEvent = Data.define(:type, :endpoint, :detail) do
  def initialize(type:, endpoint: nil, detail: nil) = super
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



13
14
15
# File 'lib/omq/monitor_event.rb', line 13

MonitorEvent = Data.define(:type, :endpoint, :detail) do
  def initialize(type:, endpoint: nil, detail: nil) = super
end