2 unstable releases
| 0.2.0 | Oct 25, 2025 |
|---|---|
| 0.1.0 | Oct 25, 2025 |
#1415 in Database interfaces
246 downloads per month
17KB
353 lines
v-authorization-lmpl
LMDB implementation for Veda authorization system.
Description
This crate provides LMDB-based storage backend for the Veda authorization framework. It implements the AuthorizationContext trait from v_authorization crate using Lightning Memory-Mapped Database (LMDB).
Features
- High-performance authorization data storage using LMDB
- Optional caching layer for improved performance
- Statistics collection support
- Thread-safe read operations
Usage
use v_authorization_lmpl::LmdbAzContext;
// Create with default settings
let mut az_ctx = LmdbAzContext::default();
// Create with custom max read counter
let mut az_ctx = LmdbAzContext::new(10000);
// Create with full configuration
let mut az_ctx = LmdbAzContext::new_with_config(
10000,
Some("tcp://localhost:9999".to_string()),
Some("full".to_string()),
Some(true)
);
Configuration
The context can be configured with:
max_read_counter: Number of authorization operations before database reconnectionstat_collector_url: Optional URL for statistics collectionstat_mode: Statistics collection mode ("full", "minimal", or "none")use_cache: Enable/disable authorization cache
Dependencies
lmdb-rs-m: LMDB Rust bindingsv_authorization: Core authorization frameworknng: Nanomsg-next-generation for statistics reporting
Dependencies
~16MB
~270K SLoC