Trait cernan::source::Source
[−]
[src]
pub trait Source<SConfig> where
Self: 'static + Send + Sized,
SConfig: 'static + Send + Clone, { fn init(config: SConfig) -> Self; fn run(self, chans: Channel, poller: Poll); fn new(chans: Channel, config: SConfig) -> RunnableSource<Self, SConfig> { ... } }
cernan Source, the originator of all metric::Event
.
A cernan Source creates all metric::Event
, doing so by listening to
network IO, reading from files, etc etc. All sources push into the routing
topology.
Required Methods
fn init(config: SConfig) -> Self
Initializes state for the given Source.
fn run(self, chans: Channel, poller: Poll)
Run method invoked by RunnableSource. It is from this method that Sources produce metric::Events.
Provided Methods
fn new(chans: Channel, config: SConfig) -> RunnableSource<Self, SConfig>
Constructs a so-called runnable source for the given Source and config.` See RunnableSource.
Implementors
impl Source<FileServerConfig> for FileServer
impl Source<FlushTimerConfig> for FlushTimer
impl Source<InternalConfig> for Internal
impl Source<StatsdConfig> for Statsd
impl<H> Source<TCPConfig> for TCP<H> where
H: TCPStreamHandler,