Class: Moleculer::Packets::Req

Inherits:
Base
  • Object
show all
Defined in:
lib/moleculer/packets/req.rb

Overview

Represents a REQ packet

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, packet_accessors, packet_attr, packet_name, #sender, #ver

Constructor Details

This class inherits a constructor from Moleculer::Packets::Base

Instance Method Details

#to_hObject

rubocop:disable Metrics/MethodLength



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/moleculer/packets/req.rb', line 20

def to_h # rubocop:disable Metrics/MethodLength
  super.merge(
    id:         id,
    action:     action,
    params:     params,
    meta:       meta,
    timeout:    timeout,
    level:      level,
    metrics:    metrics,
    parent_id:  parent_id,
    request_id: request_id,
    stream:     stream,
  )
end

#topicObject



35
36
37
# File 'lib/moleculer/packets/req.rb', line 35

def topic
  "#{super}.#{node.id}"
end