Class: NNQ::MonitorEvent

Inherits:
Data
  • Object
show all
Defined in:
lib/nnq/constants.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.



17
18
19
# File 'lib/nnq/constants.rb', line 17

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



16
17
18
19
20
# File 'lib/nnq/constants.rb', line 16

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

#endpointObject (readonly)

Returns the value of attribute endpoint

Returns:

  • (Object)

    the current value of endpoint



16
17
18
19
20
# File 'lib/nnq/constants.rb', line 16

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

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



16
17
18
19
20
# File 'lib/nnq/constants.rb', line 16

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