Class: Legion::Transport::Messages::Dynamic
Instance Attribute Summary collapse
Instance Method Summary
collapse
#content_encoding, #content_type, #encode_message, #encrypt?, #encrypt_message, #exchange_name, #expiration, #headers, #initialize, #priority, #publish, #timestamp, #validate
Methods included from Common
#channel, #channel_open?, #close, #close!, #deep_merge, #generate_consumer_tag, #open_channel, #options_builder
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3
4
5
|
# File 'lib/legion/transport/messages/dynamic.rb', line 3
def options
@options
end
|
Instance Method Details
#exchange ⇒ Object
17
18
19
|
# File 'lib/legion/transport/messages/dynamic.rb', line 17
def exchange
Legion::Transport::Exchange.new(function.runner.extension.values[:exchange])
end
|
#function ⇒ Object
21
22
23
|
# File 'lib/legion/transport/messages/dynamic.rb', line 21
def function
@function ||= Legion::Data::Model::Function[@options[:function_id]]
end
|
#message ⇒ Object
9
10
11
|
# File 'lib/legion/transport/messages/dynamic.rb', line 9
def message
{ args: @options[:args] || @options }
end
|
#routing_key ⇒ Object
13
14
15
|
# File 'lib/legion/transport/messages/dynamic.rb', line 13
def routing_key
"#{function.runner.extension.values[:name]}.#{function.runner.values[:name]}.#{function.values[:name]}"
end
|
#type ⇒ Object
5
6
7
|
# File 'lib/legion/transport/messages/dynamic.rb', line 5
def type
'task'
end
|