Class: Legion::Extensions::Apollo::Transport::Messages::Query

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

Instance Method Summary collapse

Instance Method Details

#exchangeObject



11
12
13
# File 'lib/legion/extensions/apollo/transport/messages/query.rb', line 11

def exchange
  Exchanges::Apollo
end

#messageObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/legion/extensions/apollo/transport/messages/query.rb', line 19

def message
  {
    action:         @options[:action],
    query:          @options[:query],
    entry_id:       @options[:entry_id],
    limit:          @options[:limit],
    min_confidence: @options[:min_confidence],
    status:         @options[:status],
    tags:           @options[:tags],
    relation_types: @options[:relation_types],
    depth:          @options[:depth],
    reply_to:       @options[:reply_to],
    correlation_id: @options[:correlation_id]
  }.compact
end

#routing_keyObject



15
16
17
# File 'lib/legion/extensions/apollo/transport/messages/query.rb', line 15

def routing_key
  'legion.apollo.query'
end

#typeObject



35
36
37
# File 'lib/legion/extensions/apollo/transport/messages/query.rb', line 35

def type
  'apollo_query'
end