pub struct RemoteSync { /* private fields */ }Expand description
Remote sync client for pushing/pulling to a remote registry.
Implementations§
Source§impl RemoteSync
impl RemoteSync
Sourcepub fn new(endpoint: &str, instance_id: &str, api_key: Option<String>) -> Self
pub fn new(endpoint: &str, instance_id: &str, api_key: Option<String>) -> Self
Create a new remote sync client.
Sourcepub async fn push_delta(
&self,
domain: &str,
delta_data: &MapDelta,
) -> Result<()>
pub async fn push_delta( &self, domain: &str, delta_data: &MapDelta, ) -> Result<()>
Push a delta to the remote registry.
Sourcepub async fn pull_map(&self, domain: &str) -> Result<Option<SiteMap>>
pub async fn pull_map(&self, domain: &str) -> Result<Option<SiteMap>>
Pull the latest map from the remote registry.
Sourcepub async fn pull_since(
&self,
domain: &str,
since: DateTime<Utc>,
) -> Result<Vec<MapDelta>>
pub async fn pull_since( &self, domain: &str, since: DateTime<Utc>, ) -> Result<Vec<MapDelta>>
Pull deltas since a given timestamp.
Sourcepub async fn list_available(&self) -> Result<Vec<RemoteEntry>>
pub async fn list_available(&self) -> Result<Vec<RemoteEntry>>
List all available domains on the remote registry.
Auto Trait Implementations§
impl Freeze for RemoteSync
impl !RefUnwindSafe for RemoteSync
impl Send for RemoteSync
impl Sync for RemoteSync
impl Unpin for RemoteSync
impl UnsafeUnpin for RemoteSync
impl !UnwindSafe for RemoteSync
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more