Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LLT-5814] refactor events reporting from libtelio #1021

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jauler
Copy link
Contributor

@Jauler Jauler commented Dec 11, 2024

Problem

Event reporting in libtelio is rather scattered around, and with introduction of PQ now we need to take a look at the state of multiple modules before we can decide on what events should be fired. For this reason some refactoring is required, and this PR attempts to perform it.

Solution

General convention of events is that they should be fired whenever any field in the reported state changes. This allows for, IMHO, rather fool-proof aproach of having some module responsible for event reporting, which gets notified whenever something changes. This module takes a look at current state of affairs by querying relevant modules, builds up necessary events, and if any field is different -> fires an event.

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

Nurse only needs to listen to libtelio events. To indicate that in a
strong-typed manner, update NurseIo to receive Receiver instead of
sender side and doing subscribtion inside.
@Jauler Jauler requested a review from a team as a code owner December 11, 2024 12:58
@Jauler Jauler marked this pull request as draft December 11, 2024 14:09
@Jauler Jauler force-pushed the LLT-5814_refactor_events_reporting_from_libtelio branch from bd42e11 to 3848797 Compare December 12, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant