Module: RubyLLM::Ups::IncidentMethods
- Defined in:
- lib/ruby_llm/ups/incident_methods.rb
Instance Method Summary collapse
- #create_incident(title:, impact:, status: :investigating, **attrs) ⇒ Object
- #resolve_incident(id) ⇒ Object
- #update_incident(id, **attrs) ⇒ Object
Instance Method Details
#create_incident(title:, impact:, status: :investigating, **attrs) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/ruby_llm/ups/incident_methods.rb', line 6 def create_incident(title:, impact:, status: :investigating, **attrs) = _ups_monitor. [:component_id] ||= _ups_monitor.component_id _ups_monitor.client.create_incident(title: title, impact: impact, status: status, agent_metadata: , **attrs) end |
#resolve_incident(id) ⇒ Object
19 20 21 |
# File 'lib/ruby_llm/ups/incident_methods.rb', line 19 def resolve_incident(id) update_incident(id, status: :resolved) end |
#update_incident(id, **attrs) ⇒ Object
13 14 15 16 17 |
# File 'lib/ruby_llm/ups/incident_methods.rb', line 13 def update_incident(id, **attrs) = attrs.delete(:agent_metadata) || {} = _ups_monitor..merge() _ups_monitor.client.update_incident(id, agent_metadata: , **attrs) end |