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

Path to the logs directory.

Granularity of the log lines index (used by IndexedLineReader).

Subscriptions' routing strategy.

Log scanners' configuration.

Holds collection-specific configuration overrides.

Methods

impl DatabaseConfig
[src]

Returns the configuration for a given collection by applying overrides to the base DatabaseConfig.

Returns the scanners sleep as an instance of Duration.

Trait Implementations

impl Clone for DatabaseConfig
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DatabaseConfig
[src]

Formats the value using the given formatter.

impl PartialEq for DatabaseConfig
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for DatabaseConfig
[src]

impl Default for DatabaseConfig
[src]

Returns the "default value" for a type. Read more