-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(storage-manager): move prefix related functions in crate
This change is motivated by the refactor of the Replication feature. In order to exchange metadata that can be processed by all Replicas, the key expressions associated with the data stored must be prefixed (when sent) and stripped (when received). This commit exposes two functions, at the `zenoh-plugin-storage-manager` crate, that perform these operations. The objective is to reuse these functions in the Replication refactor and, as we intend to move the Replication in its own crate, exposing them at the crate level makes it easier to then import them. * plugins/zenoh-plugin-storage-manager/src/lib.rs: - moved there the `strip_prefix` function, - moved there the `get_prefixed` function and renamed it to `prefix`. * plugins/zenoh-plugin-storage-manager/src/replica/mod.rs: updated the call to the previously named `get_prefixed` function. * plugins/zenoh-plugin-storage-manager/src/replica/storage.rs: - removed the `strip_prefix` method, - removed the `prefix` function, - updated the call to `strip_prefix` and `get_prefixed`.
- Loading branch information
Showing
3 changed files
with
89 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters