Skip to content

Commit db54e36

Browse files
authored
fix!: expose GC types without fs feature (#189)
## Description #177 made GC work with the MemStore as well. However the types needed for configuring that are still behind the `fs-store` feature. This PR exposes these types independent of feature flags. ## Breaking Changes Moved: `iroh_blobs::store::fs::options::{GcConfig, ProtectOutcome, ProtectCb}` are now `iroh_blobs::store::{GcConfig, ProtectOutcome, ProtectCb}` ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
1 parent 1f79c18 commit db54e36

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

examples/expiring-tags.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ use futures_lite::StreamExt;
1717
use iroh_blobs::{
1818
api::{blobs::AddBytesOptions, Store, Tag},
1919
hashseq::HashSeq,
20-
store::fs::options::{BatchOptions, GcConfig, InlineOptions, Options, PathOptions},
20+
store::{
21+
fs::options::{BatchOptions, InlineOptions, Options, PathOptions},
22+
GcConfig,
23+
},
2124
BlobFormat, Hash,
2225
};
2326
use tokio::signal::ctrl_c;

src/store/fs/options.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ use std::{
55
};
66

77
use super::{meta::raw_outboard_size, temp_name};
8-
pub use crate::store::gc::{GcConfig, ProtectCb, ProtectOutcome};
9-
use crate::Hash;
8+
use crate::{store::gc::GcConfig, Hash};
109

1110
/// Options for directories used by the file store.
1211
#[derive(Debug, Clone)]

src/store/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ pub(crate) mod util;
1515

1616
/// Block size used by iroh, 2^4*1024 = 16KiB
1717
pub const IROH_BLOCK_SIZE: BlockSize = BlockSize::from_chunk_log(4);
18+
19+
pub use gc::{GcConfig, ProtectCb, ProtectOutcome};

0 commit comments

Comments
 (0)