pub trait PeerMetaStore:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn put(
&self,
peer: Url,
key: String,
value: Bytes,
expiry: Option<Timestamp>,
) -> BoxFuture<'_, K2Result<()>>;
fn get(
&self,
peer: Url,
key: String,
) -> BoxFuture<'_, K2Result<Option<Bytes>>>;
fn delete(&self, peer: Url, key: String) -> BoxFuture<'_, K2Result<()>>;
}Expand description
A store for peer metadata.
This is expected to be backed by a key-value store that keys by space, peer URL and key.
Required Methods§
Sourcefn put(
&self,
peer: Url,
key: String,
value: Bytes,
expiry: Option<Timestamp>,
) -> BoxFuture<'_, K2Result<()>>
fn put( &self, peer: Url, key: String, value: Bytes, expiry: Option<Timestamp>, ) -> BoxFuture<'_, K2Result<()>>
Store a key-value pair for a given space and peer.