btdt/
lib.rs

1//! `btdt` is a tool for flexible caching files in CI pipelines.
2//!
3//! You are reading the library API documentation. If you are not looking to integrate `btdt` into
4//! your own Rust project, but to use it your CI pipelines, you probably want to read the
5//! [user guide](https://jgosmann.github.io/btdt/).
6//!
7//! `btdt` makes use of three main concepts:
8//!
9//! - **Storage**: A [storage] is a place where files are stored, for example the local filesystem.
10//! - **Cache**: A [cache] manages keys and associated data, and might use a storage to store that
11//!   data. It can also take care of cleaning old entry based on age or cache size.
12//! - **Pipeline**: A [pipeline] defines how multiple files a processed to be stored in the cache,
13//!   e.g. by archiving them in TAR format and potentially compressing them.
14//!
15//! This makes the [pipeline] module the high-level interface to the `btdt` library.
16
17pub mod cache;
18pub mod error;
19pub mod pipeline;
20pub mod storage;
21
22pub mod util {
23    //! Collects traits, functions, etc. that are not directly related to the main concepts of `btdt`.
24
25    pub(crate) mod clock;
26    pub mod close;
27    pub(crate) mod encoding;
28    pub mod http;
29    pub mod humanbytes;
30}
31pub mod test_util {
32    //! Utilities for testing `btdt` code.
33    //!
34    //! These are not intended to be used in production code.
35
36    pub mod fs;
37    pub mod fs_spec;
38}