Skip to content

Commit

Permalink
Expose DataCache module and CacheKey fields (#596)
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
  • Loading branch information
passaro authored Nov 6, 2023
1 parent 9a4cfd8 commit faebbef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions mountpoint-s3/src/data_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@
//! reducing both the number of requests as well as the latency for the reads.
//! Ultimately, this means reduced cost in terms of S3 billing as well as compute time.
pub mod disk_data_cache;
pub mod in_memory_data_cache;
mod disk_data_cache;
mod in_memory_data_cache;

use std::ops::RangeBounds;

use mountpoint_s3_client::types::ETag;
use thiserror::Error;

pub use crate::checksums::ChecksummedBytes;
pub use crate::data_cache::disk_data_cache::DiskDataCache;
pub use crate::data_cache::in_memory_data_cache::InMemoryDataCache;

/// Struct representing a key for accessing an entry in a [DataCache].
#[derive(Clone, Debug, Hash, PartialEq, Eq)]
pub struct CacheKey {
s3_key: String,
etag: ETag,
pub s3_key: String,
pub etag: ETag,
}

/// Indexes blocks within a given object.
Expand Down
2 changes: 1 addition & 1 deletion mountpoint-s3/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod checksums;
mod data_cache;
pub mod data_cache;
pub mod fs;
pub mod fuse;
mod inode;
Expand Down

0 comments on commit faebbef

Please sign in to comment.