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

feat: allow enabling/disabling of samplers #63

Merged
merged 8 commits into from
Oct 17, 2023

Conversation

brayniac
Copy link
Contributor

Adds configuration options that allow for enabling or disabling of samplers.

config.toml Show resolved Hide resolved
src/config/mod.rs Outdated Show resolved Hide resolved
} else {
Box::new(Snmp::new(config))
Box::new(Nop::new(config))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious as to what the difference between Box::new(Nop {}) and this line is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real difference, but I think standardizing on using the constructor instead of directly instantiating the struct is cleaner and makes it easier to make changes to the no-op sampler later if needed.

@brayniac brayniac merged commit cb88b25 into iopsystems:main Oct 17, 2023
15 checks passed
@brayniac brayniac deleted the config branch October 17, 2023 19:01
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