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
path: Option<PathBuf>
The path that FileServer
will watch. Globs are allowed and
FileServer
will watch multiple files.
max_lines_read: usize
The maximum number of lines to read from a file before switching to a new file.
forwards: Vec<String>
The forwards which FileServer
will obey.
config_path: Option<String>
The configured name of FileServer.
Trait Implementations
impl Clone for FileServerConfig
[src]
fn clone(&self) -> FileServerConfig
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for FileServerConfig
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for FileServerConfig
[src]
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.
fn init(config: FileServerConfig) -> Self
[src]
Make a FileServer
fn run(self, chans: Channel, poller: Poll)
[src]
Run method invoked by RunnableSource. It is from this method that Sources produce metric::Events. Read more
fn new(chans: Channel, config: SConfig) -> RunnableSource<Self, SConfig>
[src]
Constructs a so-called runnable source for the given Source and config.` See RunnableSource. Read more