Skip to main content

Module context

Module context 

Source

Re-exportsΒ§

use std::collections::BTreeMap; πŸ”’
use std::fs::remove_dir_all; πŸ”’
use std::path::Path; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::Mutex; πŸ”’
use rocksdb::Cache; πŸ”’
use rocksdb::LruCacheOptions; πŸ”’
use tuwunel_core::Result; πŸ”’
use tuwunel_core::Server; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::debug; πŸ”’
use tuwunel_core::utils::math::usize_from_f64; πŸ”’
use tuwunel_core::utils::result::LogErr; πŸ”’
use super::env::Env; πŸ”’
use crate::pool::Pool; πŸ”’

StructsΒ§

ColCache πŸ”’
One block-cache pool, plus the column families participating in it.
Context πŸ”’
Holds shared resources that must outlive an opened database.

ConstantsΒ§

SHARED_POOL πŸ”’
Name under which the shared block cache (every CF with CacheDisp::Shared) is registered in Context::col_cache.

FunctionsΒ§

after_close πŸ”’
For unit and integration tests the β€˜cleanup’ directive deletes after close to cleanup.
before_open πŸ”’
For unit and integration tests the β€˜fresh’ directive deletes found db.
delete_database_for_testing πŸ”’
For unit and integration tests; removes the database directory when called. To prevent misuse, cfg!(test) must be true for a unit test or the integration test server is named localhost.

Type AliasesΒ§

ColCaches πŸ”’
Map of block-cache pools keyed by pool name. The pool name is either SHARED_POOL or the first-arrival CF that created it.