You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the effort to decompose the restate-types monolith into focused,
composable utility crates.
Add a new `restate-util-sharding` crate (in `util/sharding/`) following the
`util/string` pattern. It defines the foundational sharding types:
- `KeyRange`: a compact `Copy` newtype over `std::range::RangeInclusive<u64>`.
16 bytes (vs 24 for std::ops::RangeInclusive), wire-format compatible serde
and bilrost encoding. Provides iter(), is_overlapping(), and split() helpers.
- `PartitionKey`: type alias for u64
- `WithPartitionKey`: trait for types that carry a partition key
The crate is re-exported from `restate-types::sharding` for ergonomic access.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments