Skip to content

Remove Observables and switch to Channels #772

Open
@melotic

Description

@melotic

Our current implementation for scanning files/directories is done by using observables:

Instead, we should architect a channel system that works as:

  1. Create a new Task & Channel for each detector
  2. Launch each detector with a semphore blocking execution untill all detectors have subscribed to the channel
  3. Begin scanning directories
  4. Each file found will get sent through the channel
  5. Detector gets the message, and scans file or ignores it depending on the pattern

We could also implement a Broadcast channel similar to https://docs.rs/tokio/latest/tokio/sync/index.html#broadcast-channel

AB#2102424

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:refactorRefactoring or improving of existing code

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions