pub struct SyncNode { /* private fields */ }Expand description
A running iroh endpoint routing sync control and immutable blob protocols.
Implementations§
Source§impl SyncNode
impl SyncNode
Sourcepub fn addr(&self) -> EndpointAddr
pub fn addr(&self) -> EndpointAddr
Returns this endpoint’s currently advertised direct/relay address.
Sourcepub async fn sync_with(
&self,
remote: EndpointAddr,
) -> Result<SyncReport, DbError>
pub async fn sync_with( &self, remote: EndpointAddr, ) -> Result<SyncReport, DbError>
Reconciles both peers over authenticated QUIC and iroh-blobs.
Sourcepub fn offer_invitation(&self, invitation: &Invitation) -> Result<(), DbError>
pub fn offer_invitation(&self, invitation: &Invitation) -> Result<(), DbError>
Makes one signed invitation available to its endpoint-bound subject.
Sourcepub async fn request_invitation(
&self,
remote: EndpointAddr,
) -> Result<IrohDb, DbError>
pub async fn request_invitation( &self, remote: EndpointAddr, ) -> Result<IrohDb, DbError>
Requests this authenticated endpoint’s offered invitation and imports it locally.
Sourcepub async fn bootstrap_from(
&self,
remote: EndpointAddr,
snapshot: Snapshot,
) -> Result<(), DbError>
pub async fn bootstrap_from( &self, remote: EndpointAddr, snapshot: Snapshot, ) -> Result<(), DbError>
Fetches and installs a trusted encrypted snapshot before ordinary tail reconciliation.
Sourcepub async fn fetch_blob_from(
&self,
remote: EndpointAddr,
reference: &BlobRef,
) -> Result<(), DbError>
pub async fn fetch_blob_from( &self, remote: EndpointAddr, reference: &BlobRef, ) -> Result<(), DbError>
Downloads a complete encrypted blob from one authorized provider into pinned storage.
Sourcepub async fn stream_blob_from(
&self,
providers: Vec<EndpointAddr>,
reference: &BlobRef,
options: FetchOptions,
) -> Result<(BlobStream, FetchMetrics), DbError>
pub async fn stream_blob_from( &self, providers: Vec<EndpointAddr>, reference: &BlobRef, options: FetchOptions, ) -> Result<(BlobStream, FetchMetrics), DbError>
Opens a lazy seekable stream whose missing chunks rotate across authorized providers.
Sourcepub async fn join_gossip(
&self,
bootstrap: Vec<EndpointAddr>,
) -> Result<GossipSession, DbError>
pub async fn join_gossip( &self, bootstrap: Vec<EndpointAddr>, ) -> Result<GossipSession, DbError>
Joins this domain’s unguessable gossip topic using optional bootstrap endpoints.
Auto Trait Implementations§
impl Freeze for SyncNode
impl !RefUnwindSafe for SyncNode
impl Send for SyncNode
impl Sync for SyncNode
impl Unpin for SyncNode
impl !UnwindSafe for SyncNode
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more