zenoh
zenoh copied to clipboard
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_prefixfunction, - moved there the
get_prefixedfunction and renamed it toprefix.
- moved there the
- plugins/zenoh-plugin-storage-manager/src/replica/mod.rs: updated the call to the previously named
get_prefixedfunction. - plugins/zenoh-plugin-storage-manager/src/replica/storage.rs:
- removed the
strip_prefixmethod, - removed the
prefixfunction, - updated the call to
strip_prefixandget_prefixed.
- removed the