1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
//! Logic for dealing with various storage backends. //! //! Storage in terminus-store is set up in a generic way. Many data //! structures simply rely on something that implements `FileLoad` and //! `FileStore`, leaving the details of retrieval and storage to the //! implementer. //! //! Two mechanisms are provided in this library: //! - a memory backend //! - a file backend //! //! Terminus-store stores databases as part of 2 data structures: a //! layer store and a label store. //! //! A layer store is a set of directories (though it is up to a //! specific implementation whether or not this is actually a //! directory on a filesystem or some other mechanism). Each directory //! is given a unique name of 20 bytes in hexadecimal format, and //! stores the layer's primitive data structures as files inside that //! directory. //! //! A label store is a set of files. The file name is of the format //! `foo.label`, for database `foo`. This file contains the name of //! the layer this label is pointing at. mod consts; pub mod directory; mod file; mod label; mod layer; mod locking; pub mod memory; pub use file::*; pub use label::*; pub use layer::*;