Struct cernan::source::FileServerConfig [] [src]

pub struct FileServerConfig {
    pub path: Option<PathBuf>,
    pub max_lines_read: usize,
    pub forwards: Vec<String>,
    pub config_path: Option<String>,
}

The configuration struct for FileServer.

Fields

The path that FileServer will watch. Globs are allowed and FileServer will watch multiple files.

The maximum number of lines to read from a file before switching to a new file.

The forwards which FileServer will obey.

The configured name of FileServer.

Trait Implementations

impl Clone for FileServerConfig
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FileServerConfig
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for FileServerConfig
[src]

[src]

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

impl Source<FileServerConfig> for FileServer
[src]

FileServer as Source

The 'run' of FileServer performs the cooperative scheduling of reads over FileServer's configured files. Much care has been taking to make this scheduling 'fair', meaning busy files do not drown out quiet files or vice versa but there's no one perfect approach. Very fast files will be lost if your system aggressively rolls log files. FileServer will keep a file handler open but should your system move so quickly that a file disappears before cernan is able to open it the contents will be lost. This should be a rare occurence.

Specific operating systems support evented interfaces that correct this problem but your intrepid authors know of no generic solution.

[src]

Make a FileServer

[src]

Run method invoked by RunnableSource. It is from this method that Sources produce metric::Events. Read more

[src]

Constructs a so-called runnable source for the given Source and config.` See RunnableSource. Read more

Auto Trait Implementations