Skip to content

shim: add ConnectionType #192

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

Closed
wants to merge 2 commits into from

Conversation

gabriele-0201
Copy link
Contributor

No description provided.

Copy link
Contributor Author

gabriele-0201 commented Jan 11, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

This was referenced Jan 11, 2024
@gabriele-0201 gabriele-0201 force-pushed the gab_shim_add_no_retry_flag branch from 7d360f1 to 16d325a Compare January 12, 2024 14:43
ConnectionType::Single(conn) => {
action(conn.clone()).await.unwrap_or_else(|e| {
tracing::error!("{}\n", e);
// TODO: Is it ok to panic here?
Copy link
Contributor

Choose a reason for hiding this comment

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

no, it's better to adapt the function signatures to support errors.

// the same connection will be used for all the docks, and thus
// it's shared among all of them
#[derive(Clone)]
pub enum ConnectionType {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: a "type" would likely be a non-data-carrying union

this is just a Connection (which has two different variants)

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