Class: Legion::Gaia::Router::Transport::Messages::OutputFrameMessage

Inherits:
Transport::Message
  • Object
show all
Defined in:
lib/legion/gaia/router/transport/messages/output_frame_message.rb

Instance Method Summary collapse

Instance Method Details

#exchangeObject



9
10
11
# File 'lib/legion/gaia/router/transport/messages/output_frame_message.rb', line 9

def exchange
  Exchanges::Gaia
end

#messageObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/legion/gaia/router/transport/messages/output_frame_message.rb', line 17

def message
  frame = @options[:frame]
  return @options.except(:frame) unless frame

  {
    id: frame.id,
    in_reply_to: frame.in_reply_to,
    content: frame.content,
    content_type: frame.content_type,
    channel_id: frame.channel_id,
    session_continuity_id: frame.session_continuity_id,
    channel_hints: frame.channel_hints,
    metadata: frame.,
    created_at: frame.created_at.to_s
  }
end

#routing_keyObject



13
14
15
# File 'lib/legion/gaia/router/transport/messages/output_frame_message.rb', line 13

def routing_key
  'gaia.outbound'
end

#typeObject



34
35
36
# File 'lib/legion/gaia/router/transport/messages/output_frame_message.rb', line 34

def type
  'output_frame'
end