[][src]Trait tempest::source::Source

pub trait Source {
    fn name(&self) -> &'static str;
fn healthy(&mut self) -> SourceResult<()>; fn validate(&mut self) -> SourceResult<()> { ... }
fn setup(&mut self) -> SourceResult<()> { ... }
fn drain(&mut self) -> SourceResult<()> { ... }
fn teardown(&mut self) -> SourceResult<()> { ... }
fn connect(&mut self) -> SourceResult<()> { ... }
fn poll(&mut self) -> SourcePollResult { ... }
fn monitor(&mut self) -> SourceResult<()> { ... }
fn ack(&mut self, _msg_id: MsgId) -> SourceResult<(i32, i32)> { ... }
fn batch_ack(&mut self, msgs: Vec<MsgId>) -> SourceResult<(i32, i32)> { ... }
fn max_backoff(&self) -> SourceResult<&u64> { ... }
fn max_pending(&self) -> SourceResult<&SourcePollPending> { ... }
fn poll_interval(&self) -> SourceResult<&SourceInterval> { ... }
fn monitor_interval(&self) -> SourceResult<&SourceInterval> { ... }
fn ack_policy(&self) -> SourceResult<&SourceAckPolicy> { ... }
fn ack_interval(&self) -> SourceResult<&SourceInterval> { ... }
fn msg_error(&mut self, _msg: Msg) { ... }
fn msg_timeout(&mut self, _msg: Msg) { ... }
fn flush_metrics(&mut self) { ... } }

This trait is for defining Topology Sources

Required methods

fn name(&self) -> &'static str

return the name of this source

fn healthy(&mut self) -> SourceResult<()>

Loading content...

Provided methods

fn validate(&mut self) -> SourceResult<()>

fn setup(&mut self) -> SourceResult<()>

fn drain(&mut self) -> SourceResult<()>

fn teardown(&mut self) -> SourceResult<()>

fn connect(&mut self) -> SourceResult<()>

fn poll(&mut self) -> SourcePollResult

Poll for new message from the source

fn monitor(&mut self) -> SourceResult<()>

fn ack(&mut self, _msg_id: MsgId) -> SourceResult<(i32, i32)>

fn batch_ack(&mut self, msgs: Vec<MsgId>) -> SourceResult<(i32, i32)>

fn max_backoff(&self) -> SourceResult<&u64>

fn max_pending(&self) -> SourceResult<&SourcePollPending>

fn poll_interval(&self) -> SourceResult<&SourceInterval>

fn monitor_interval(&self) -> SourceResult<&SourceInterval>

fn ack_policy(&self) -> SourceResult<&SourceAckPolicy>

fn ack_interval(&self) -> SourceResult<&SourceInterval>

Configures how often the source should check for new messages to ack

fn msg_error(&mut self, _msg: Msg)

A message generated an error while being handled by the topology. Implement clean up code here.

fn msg_timeout(&mut self, _msg: Msg)

A message timed out while being handled by the topology. Implement clean up code here.

fn flush_metrics(&mut self)

Called to flush source.metrics

Loading content...

Implementors

impl Source for DefaultSource[src]

Loading content...