CCF
Loading...
Searching...
No Matches
Enumerations | Functions
asynchost::files_cleanup Namespace Reference

Enumerations

enum class  DigestCheckResult : std::uint8_t { match_found , no_match , file_gone }
 

Functions

std::vector< std::pair< size_t, std::filesystem::path > > find_committed_ledger_chunks (const std::filesystem::path &dir)
 
std::optional< ccf::crypto::Sha256Hashhash_file (const std::filesystem::path &path)
 
DigestCheckResult check_digest_against_read_only_dirs (const std::filesystem::path &local_path, const std::vector< std::filesystem::path > &read_only_dirs)
 
std::optional< std::vector< std::pair< size_t, std::filesystem::path > > > find_committed_snapshots (const std::filesystem::path &dir)
 
std::optional< size_t > highest_committed_snapshot_seqno (const std::vector< std::pair< size_t, std::filesystem::path > > &committed_snapshots)
 
void cleanup_old_snapshots (const std::vector< std::pair< size_t, std::filesystem::path > > &committed_snapshots, size_t max_retained)
 
void cleanup_old_ledger_chunks (const std::filesystem::path &main_dir, const std::vector< std::filesystem::path > &read_only_dirs, size_t max_retained, std::optional< size_t > snapshot_watermark=std::nullopt)
 

Enumeration Type Documentation

◆ DigestCheckResult

enum class asynchost::files_cleanup::DigestCheckResult : std::uint8_t
strong
Enumerator
match_found 
no_match 
file_gone 

Function Documentation

◆ check_digest_against_read_only_dirs()

DigestCheckResult asynchost::files_cleanup::check_digest_against_read_only_dirs ( const std::filesystem::path &  local_path,
const std::vector< std::filesystem::path > &  read_only_dirs 
)
inline

◆ cleanup_old_ledger_chunks()

void asynchost::files_cleanup::cleanup_old_ledger_chunks ( const std::filesystem::path &  main_dir,
const std::vector< std::filesystem::path > &  read_only_dirs,
size_t  max_retained,
std::optional< size_t >  snapshot_watermark = std::nullopt 
)
inline

◆ cleanup_old_snapshots()

void asynchost::files_cleanup::cleanup_old_snapshots ( const std::vector< std::pair< size_t, std::filesystem::path > > &  committed_snapshots,
size_t  max_retained 
)
inline

◆ find_committed_ledger_chunks()

std::vector< std::pair< size_t, std::filesystem::path > > asynchost::files_cleanup::find_committed_ledger_chunks ( const std::filesystem::path &  dir)
inline

◆ find_committed_snapshots()

std::optional< std::vector< std::pair< size_t, std::filesystem::path > > > asynchost::files_cleanup::find_committed_snapshots ( const std::filesystem::path &  dir)
inline

◆ hash_file()

std::optional< ccf::crypto::Sha256Hash > asynchost::files_cleanup::hash_file ( const std::filesystem::path &  path)
inline

◆ highest_committed_snapshot_seqno()

std::optional< size_t > asynchost::files_cleanup::highest_committed_snapshot_seqno ( const std::vector< std::pair< size_t, std::filesystem::path > > &  committed_snapshots)
inline