pub struct PushPath { /* private fields */ }Expand description
A git server’s push path: one ArchiveWrite arm plus the shared indexer.
This is what the bench drives, and the reason the indexer is shared rather than per-impl: swapping the writer changes the durability contract and nothing else.
Implementations§
Source§impl PushPath
impl PushPath
Sourcepub fn new(
writer: Box<dyn ArchiveWrite>,
archive: &Path,
journal: Option<PathBuf>,
) -> Result<Self>
pub fn new( writer: Box<dyn ArchiveWrite>, archive: &Path, journal: Option<PathBuf>, ) -> Result<Self>
Wrap a writer. archive must be the file the writer appends to;
journal the ack-path record a pre-index read falls back to, if the
writer keeps one.
Sourcepub fn with_absorber(
writer: Box<dyn ArchiveWrite>,
archive: &Path,
journal: Option<PathBuf>,
absorber: Arc<dyn ObjectAbsorb>,
) -> Result<Self>
pub fn with_absorber( writer: Box<dyn ArchiveWrite>, archive: &Path, journal: Option<PathBuf>, absorber: Arc<dyn ObjectAbsorb>, ) -> Result<Self>
The same push path whose drain also absorbs object rows.
This is the one a git store builds: push_pack
still returns after the two fsyncs and nothing about the ack changes, but
the job that leaves on the channel now ends in oids rather than in one
pack row.
Sourcepub fn durability(&self) -> &'static str
pub fn durability(&self) -> &'static str
What this arm’s append actually promises.
Sourcepub fn push_pack(&self, account: &str, bytes: &[u8]) -> Result<(u64, Extent)>
pub fn push_pack(&self, account: &str, bytes: &[u8]) -> Result<(u64, Extent)>
Store a pushed pack verbatim and queue its index job.
Returns (pack_id, extent). Everything expensive about the pack —
parsing it, hashing it, building the tables — happens after this returns.
Sourcepub fn pool(&self) -> &IndexerPool
pub fn pool(&self) -> &IndexerPool
The pool, for a caller that wants to drain every account.