-
-
Notifications
You must be signed in to change notification settings - Fork 2
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: Implement basic producer #33
Conversation
src/producer.rs
Outdated
topic: Topic, | ||
config: KafkaConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense for this to not have to accept the topic/config, and for us to have it set up somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree, we can just put this method on a struct and load it in there
This implements the basics of a producer for sending results back to sentry.
7c3c435
to
da568f7
Compare
src/scheduler.rs
Outdated
// TODO: Producer should be instantiated with these values and shared | ||
let config = KafkaConfig::new_config(["0.0.0.0".to_string()].to_vec(), None); | ||
let topic = Topic::new("uptime-checker-results"); | ||
let _ = produce_checker_result(&check_result, topic, config).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, let's move the config outside of the function though I think.
If you address the earlier comment of making a ResultsProducer struct we can pull that out also (will need to wrap in Arc)
Once #43 is merged we can pass the config into run_scheduler
and it can construct the KafkaConfig from that
This implements the basics of a producer for sending results back to sentry.