Struct exar::CollectionConfig [] [src]

pub struct CollectionConfig {
    pub logs_path: String,
    pub index_granularity: u64,
    pub routing_strategy: RoutingStrategy,
    pub scanners: ScannersConfig,
}

Exar DB's collection configuration.

Examples

extern crate exar;

use exar::*;

let config = CollectionConfig {
    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
    }
};

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.

Methods

impl CollectionConfig
[src]

fn scanners_sleep_duration(&self) -> Duration

Returns the scanners sleep as an instance of Duration.

Trait Implementations

impl Decodable for CollectionConfig
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<CollectionConfig, __D::Error>

impl Encodable for CollectionConfig
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for CollectionConfig
[src]

impl PartialEq for CollectionConfig
[src]

fn eq(&self, __arg_0: &CollectionConfig) -> bool

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

fn ne(&self, __arg_0: &CollectionConfig) -> bool

This method tests for !=.

impl Debug for CollectionConfig
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for CollectionConfig
[src]

fn clone(&self) -> CollectionConfig

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 CollectionConfig
[src]

fn default() -> CollectionConfig

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