Class: Legion::LLM::Fleet::Request

Inherits:
Transport::Message show all
Defined in:
lib/legion/llm/fleet/request.rb

Constant Summary collapse

PRIORITY_MAP =
{ critical: 9, high: 7, normal: 5, low: 2 }.freeze

Constants inherited from Transport::Message

Transport::Message::LLM_ENVELOPE_KEYS

Instance Method Summary collapse

Methods inherited from Transport::Message

#app_id, #correlation_id, #headers, #message, #message_context, #message_id, #tracing_headers

Instance Method Details

#exchangeObject



12
# File 'lib/legion/llm/fleet/request.rb', line 12

def exchange    = Legion::LLM::Fleet::Exchange

#expirationObject



16
# File 'lib/legion/llm/fleet/request.rb', line 16

def expiration  = @options[:ttl] ? (@options[:ttl] * 1000).to_s : super

#priorityObject



15
# File 'lib/legion/llm/fleet/request.rb', line 15

def priority    = map_priority(@options[:priority])

#reply_toObject



14
# File 'lib/legion/llm/fleet/request.rb', line 14

def reply_to    = @options[:reply_to]

#routing_keyObject



13
# File 'lib/legion/llm/fleet/request.rb', line 13

def routing_key = @options[:routing_key]

#typeObject



11
# File 'lib/legion/llm/fleet/request.rb', line 11

def type        = 'llm.fleet.request'