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

refactor: move scanner traits to model crate and introduce result struct #1577

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

nichtsfrei
Copy link
Member

@nichtsfrei nichtsfrei commented Feb 27, 2024

  • Change: move osp specific Scanner implementation from openvasd into osp
  • Change: move scanner trait to models library
  • Change: remove FetchResult in favor of ScanResults

@nichtsfrei nichtsfrei force-pushed the preparation-for-scheduler branch from a8144a1 to 6603e67 Compare February 27, 2024 16:04
Instead of using a tuple of (Status, [Result]) a struct ScanResults is
introduced. This will help us to create bulk retrieving operations on
implementations that makes sense.

Although the benefits are currently minimal when we introduce a
scheduler for scans it will make it easier to handle results in that
fashion.
@nichtsfrei nichtsfrei force-pushed the preparation-for-scheduler branch from 6603e67 to 7b64d0b Compare February 27, 2024 16:10
To be able to reuse the traits for openvasd they're moved into the
models crate inside models::scanner module.

This allows us to implement the technology specific scanner inside their
traits and a scheduler using them instead of having to implement
multiple schedulers inside the technology specific crates.
@nichtsfrei nichtsfrei changed the title Change: remove FetchResult in favor of ScanResults refactor: move scanner traits to model crate and introduce result struct Feb 27, 2024
@nichtsfrei nichtsfrei marked this pull request as ready for review February 27, 2024 18:29
@nichtsfrei nichtsfrei requested a review from a team as a code owner February 27, 2024 18:29
@nichtsfrei nichtsfrei force-pushed the preparation-for-scheduler branch from 2a088ee to b869030 Compare February 27, 2024 18:30
jjnicola
jjnicola previously approved these changes Feb 28, 2024
@nichtsfrei nichtsfrei merged commit bb7ae5b into main Feb 28, 2024
18 checks passed
@nichtsfrei nichtsfrei deleted the preparation-for-scheduler branch February 28, 2024 08:56
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.

2 participants