Class: Moleculer::Packets::Req
- Defined in:
- lib/moleculer/packets/req.rb
Overview
Represents a REQ packet
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#to_h ⇒ Object
rubocop:disable Metrics/MethodLength.
- #topic ⇒ Object
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_h ⇒ Object
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: , timeout: timeout, level: level, metrics: metrics, parent_id: parent_id, request_id: request_id, stream: stream, ) end |
#topic ⇒ Object
35 36 37 |
# File 'lib/moleculer/packets/req.rb', line 35 def topic "#{super}.#{node.id}" end |