Class: Legion::Extensions::Ollama::Transport::Messages::RegistryEvent
- Inherits:
-
Transport::Message
- Object
- Transport::Message
- Legion::Extensions::Ollama::Transport::Messages::RegistryEvent
- Defined in:
- lib/legion/extensions/ollama/transport/messages/registry_event.rb
Overview
Publishes lex-llm RegistryEvent envelopes to the llm.registry exchange.
Instance Method Summary collapse
- #app_id ⇒ Object
- #exchange ⇒ Object
-
#initialize(event:, **options) ⇒ RegistryEvent
constructor
A new instance of RegistryEvent.
- #persistent ⇒ Object
- #routing_key ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(event:, **options) ⇒ RegistryEvent
Returns a new instance of RegistryEvent.
12 13 14 15 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 12 def initialize(event:, **) envelope = event.to_h super(**envelope.merge()) end |
Instance Method Details
#app_id ⇒ Object
29 30 31 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 29 def app_id 'lex-ollama' end |
#exchange ⇒ Object
17 18 19 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 17 def exchange Transport::Exchanges::LlmRegistry end |
#persistent ⇒ Object
33 34 35 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 33 def persistent false end |
#routing_key ⇒ Object
21 22 23 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 21 def routing_key @options[:routing_key] || "llm.registry.#{@options.fetch(:event_type)}" end |
#type ⇒ Object
25 26 27 |
# File 'lib/legion/extensions/ollama/transport/messages/registry_event.rb', line 25 def type 'llm.registry.event' end |