pub struct Service { /* private fields */ }Implementations§
Source§impl Service
impl Service
Sourcepub fn with_record_peers(self, peers: SyncPeers) -> Self
pub fn with_record_peers(self, peers: SyncPeers) -> Self
Overlay peers as record sources: every retrieval call takes the current window as separate sources, so each package is verified on its own and a bad one only moves retrieval on to the next peer.
Sourcepub fn with_peer_sync(self, sync: PeerSync) -> Result<Self, Error>
pub fn with_peer_sync(self, sync: PeerSync) -> Result<Self, Error>
Fast inventory synchronization from configured overlay peers. Only run(true) schedules it; configuring peers does not dial or fetch.
Sourcepub fn with_discovery(self, discovery: Discovery) -> Result<Self, Error>
pub fn with_discovery(self, discovery: Discovery) -> Result<Self, Error>
Automatic peer discovery from seeds and peer address exchange. Only run(true) schedules it, as its own bounded step before inventory sync.
Source§impl Service
impl Service
Sourcepub const CATCH_UP_BLOCKS: u64 = 256
pub const CATCH_UP_BLOCKS: u64 = 256
Most blocks one sync round scans before it re-selects headers.
Sourcepub const CATCH_UP_TIME: Duration
pub const CATCH_UP_TIME: Duration
Longest scanning stretch of one sync round.
Source§impl Service
impl Service
pub fn bind( address: SocketAddr, token: String, engine: Arc<Engine>, ) -> Result<Self, Error>
pub fn address(&self) -> Result<SocketAddr, Error>
pub fn shutdown_handle(&self) -> ShutdownHandle
Sourcepub fn with_record_sources(
self,
sources: Vec<Arc<dyn RecordSource + Send + Sync>>,
) -> Result<Self, Error>
pub fn with_record_sources( self, sources: Vec<Arc<dyn RecordSource + Send + Sync>>, ) -> Result<Self, Error>
Explicit optional candidates for background object recovery. Merely configuring handles does not dial, fetch, change headers or scan coverage.
pub fn with_commit_sources(self, sources: CommitSources) -> Result<Self, Error>
Sourcepub fn with_cache_limit(self, bytes: u64) -> Result<Self, Error>
pub fn with_cache_limit(self, bytes: u64) -> Result<Self, Error>
Operational soft target, not persisted archive identity or a disk quota. Only run(true) schedules enforcement; run(false) remains worker-free. Zero requests eventual drainage of unprotected cache over bounded steps.
Sourcepub fn with_retention(
self,
scratch: PathBuf,
slice: Duration,
) -> Result<Self, Error>
pub fn with_retention( self, scratch: PathBuf, slice: Duration, ) -> Result<Self, Error>
Configure background acquisition of every object, bounded only by the
protocol geometry. Each round spends at most slice on one object; an
unfinished object resumes from its stored records in a later round. The
caller supplies an owned scratch directory. Only run(true) schedules it;
pruned archives perform no automatic content acquisition.
Auto Trait Implementations§
impl !Freeze for Service
impl !RefUnwindSafe for Service
impl !UnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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