Struct exar::DatabaseConfig
[−]
[src]
pub struct DatabaseConfig {
pub logs_path: String,
pub index_granularity: u64,
pub routing_strategy: RoutingStrategy,
pub scanners: ScannersConfig,
pub collections: BTreeMap<String, PartialCollectionConfig>,
}Exar DB's configuration.
Examples
extern crate exar; use exar::*; use std::collections::BTreeMap; let config = DatabaseConfig { logs_path: "/path/to/logs".to_owned(), index_granularity: 100000, routing_strategy: RoutingStrategy::default(), scanners: ScannersConfig { nr_of_scanners: 2, sleep_time_in_ms: 10 }, collections: BTreeMap::new() };
Fields
logs_path: String
Path to the logs directory.
index_granularity: u64
Granularity of the log lines index (used by IndexedLineReader).
routing_strategy: RoutingStrategy
Subscriptions' routing strategy.
scanners: ScannersConfig
Log scanners' configuration.
collections: BTreeMap<String, PartialCollectionConfig>
Holds collection-specific configuration overrides.
Methods
impl DatabaseConfig[src]
fn collection_config(&self, collection_name: &str) -> CollectionConfig
Returns the configuration for a given collection by applying overrides to the base DatabaseConfig.
fn scanners_sleep_duration(&self) -> Duration
Returns the scanners sleep as an instance of Duration.
Trait Implementations
impl Decodable for DatabaseConfig[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<DatabaseConfig, __D::Error>
impl Encodable for DatabaseConfig[src]
impl Eq for DatabaseConfig[src]
impl PartialEq for DatabaseConfig[src]
fn eq(&self, __arg_0: &DatabaseConfig) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &DatabaseConfig) -> bool
This method tests for !=.
impl Debug for DatabaseConfig[src]
impl Clone for DatabaseConfig[src]
fn clone(&self) -> DatabaseConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Default for DatabaseConfig[src]
fn default() -> DatabaseConfig
Returns the "default value" for a type. Read more