Struct tx_indexer::config::TxIndexerConfig
source · pub struct TxIndexerConfig<H: EventHandler> {
pub handler: H,
pub node_address: NodeAddress,
pub network: NetworkConfig,
pub since_slot: Option<(u64, String)>,
pub safe_block_depth: usize,
pub event_filter: Filter,
pub retry_policy: RetryPolicy,
}
Fields§
§handler: H
§node_address: NodeAddress
§network: NetworkConfig
§since_slot: Option<(u64, String)>
Slot number and hash as hex string (optional). If not provided, sync will begin from the tip of the chain.
safe_block_depth: usize
Minimum depth a block has to be from the tip for it to be considered “confirmed” See: https://oura.txpipe.io/v1/advanced/rollback_buffer
event_filter: Filter
§retry_policy: RetryPolicy
Retry policy - how much to retry for each event callback failure
This only takes effect on ErrorPolicy for a particular error is Retry
.
Once retries are exhausted, the handler will error (same treatment as ErrorPolicy::Exit)
Implementations§
source§impl<H: EventHandler> TxIndexerConfig<H>
impl<H: EventHandler> TxIndexerConfig<H>
pub fn new( handler: H, node_address: NodeAddress, network: NetworkConfig, since_slot: Option<(u64, String)>, safe_block_depth: usize, event_filter: Filter, retry_policy: RetryPolicy ) -> Self
Auto Trait Implementations§
impl<H> Freeze for TxIndexerConfig<H>where
H: Freeze,
impl<H> RefUnwindSafe for TxIndexerConfig<H>where
H: RefUnwindSafe,
impl<H> Send for TxIndexerConfig<H>
impl<H> Sync for TxIndexerConfig<H>where
H: Sync,
impl<H> Unpin for TxIndexerConfig<H>where
H: Unpin,
impl<H> UnwindSafe for TxIndexerConfig<H>where
H: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request