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

Change: adds a Lambda scanner for easier testing #1580

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

nichtsfrei
Copy link
Member

Instead of having to copy and paste the async traits over and over for
testing purposes a new Lambda scanner is created.

This allows us to easily build a scanner based on sync functions.

To use it you can use the LambdaBuilder:

use models::scanner::Error as ScanError;
use models::scanner::LambdaBuilder;
let builder = LambdaBuilder::default().with_start(|_|
Err(ScanError::Unexpected("meh".to_string())));
let scanner = builder.build();

@nichtsfrei nichtsfrei requested a review from a team as a code owner March 1, 2024 12:05
@nichtsfrei nichtsfrei force-pushed the rs-add-lambda-scanner branch 2 times, most recently from 994db65 to cbd3df0 Compare March 1, 2024 12:14
Instead of having to copy and paste the async traits over and over for
testing purposes a new Lambda scanner is created.

This allows us to easily build a scanner based on sync functions.

To use it you can use the LambdaBuilder:

```
use models::scanner::Error as ScanError;
use models::scanner::LambdaBuilder;
let builder = LambdaBuilder::default().with_start(|_|
Err(ScanError::Unexpected("meh".to_string())));
let scanner = builder.build();
```
@nichtsfrei nichtsfrei merged commit 90ecc3a into main Mar 4, 2024
18 checks passed
@nichtsfrei nichtsfrei deleted the rs-add-lambda-scanner branch March 4, 2024 13:53
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