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

Switching some restate-core types to the new module style #2359

Merged
merged 10 commits into from
Nov 26, 2024
Merged

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Nov 26, 2024

I really dig this new style to define modules, especially for modules that have significant code/types written in their mod.rs. This makes finding the file much easier.

For example, metadata_store.rs now has the trait MetadataStore instead of metadata_store/mod.rs


Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

github-actions bot commented Nov 26, 2024

Test Results

  7 files  ±0    7 suites  ±0   4m 18s ⏱️ -8s
 47 tests ±0   46 ✅ ±0  1 💤 ±0  0 ❌ ±0 
182 runs  ±0  179 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit 2ac41ac. ± Comparison against base commit 7b07c93.

♻️ This comment has been updated with latest results.

This changes the remaining bits of the API and refactors most of the code to make use of it.

What's new:
- `TaskCenter` is now simply an zero-size struct with associated functions.
- `restate_core::task_center::Handle` provides a way to pass a concrete task-center value around
- `restate_core::task_center::OwnedHandle` is mostly unused at the moment, but it's meant to be a future mechanism for auto-drop (guard) task-center ownership. Primarily to be used in main fn.
I really dig this new style to define modules, especially for modules that have significant code/types written in their mod.rs. This makes finding the file much easier.

For example, `metadata_store.rs` now has the trait `MetadataStore` instead of `metadata_store/mod.rs`
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Indeed :-) LGTM. +1 for merging.

@AhmedSoliman AhmedSoliman merged commit 2ac41ac into main Nov 26, 2024
21 checks passed
@AhmedSoliman AhmedSoliman deleted the pr2359 branch November 26, 2024 15:27
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