Class: Legion::Extensions::Mesh::Transport::Messages::MeshDeparture

Inherits:
Transport::Message
  • Object
show all
Defined in:
lib/legion/extensions/mesh/transport/messages/mesh_departure.rb

Instance Method Summary collapse

Instance Method Details

#exchangeObject



9
10
11
# File 'lib/legion/extensions/mesh/transport/messages/mesh_departure.rb', line 9

def exchange
  Legion::Extensions::Mesh::Transport::Exchanges::Fanout
end

#messageObject



17
18
19
20
21
22
23
24
# File 'lib/legion/extensions/mesh/transport/messages/mesh_departure.rb', line 17

def message
  {
    type:         'mesh_departure',
    agent_id:     @options[:agent_id],
    capabilities: @options[:capabilities] || [],
    departed_at:  Time.now.to_s
  }
end

#routing_keyObject



13
14
15
# File 'lib/legion/extensions/mesh/transport/messages/mesh_departure.rb', line 13

def routing_key
  'mesh.departure'
end

#typeObject



26
27
28
# File 'lib/legion/extensions/mesh/transport/messages/mesh_departure.rb', line 26

def type
  'mesh_departure'
end