pub struct StoreConfig {
pub query_channel_size: usize,
pub query_parallelism: usize,
pub handle_watch_query_channel_size: usize,
pub chain_events_batch_size: usize,
pub mutation_tracker_timeout: Duration,
pub garbage_collect_interval: Duration,
pub chain_index_deferred_interval: Option<Duration>,
pub chain_index_deferred_query_interval: Duration,
pub chain_index_deferred_max_interval: Duration,
}Expand description
Configuration for Store.
Fields§
§query_channel_size: usizeSize of the channel of queries to be executed.
query_parallelism: usizeMaximum number fo queries to execute in parallel.
handle_watch_query_channel_size: usizeSize of the result channel of each watched query.
chain_events_batch_size: usizeMaximum number of events from chain engine to batch together if more are available.
mutation_tracker_timeout: DurationTimeout for mutations that were awaiting for entities to be returned.
garbage_collect_interval: DurationHow often the garbage collection process will run.
Since garbage collection doesn’t happen on the whole index, but only on
entities that got flagged during search, it is better to run more
often than less. GarbageCollectorConfig::queue_size can be tweaked
to control rate of collection.
chain_index_deferred_interval: Option<Duration>Specifies the interval at which new blocks in the chain get indexed.
New blocks may not necessarily get immediately indexed if they don’t
fall in the interval of chain_index_min_depth and
chain_index_depth_leeway.
Indexation can also be prevented if user queries were recently executed
(see chain_index_deferred_query_secs)
If ‘0’ is specified, deferred indexation is disabled and blocks are indexed when the chain layer emits events.
chain_index_deferred_query_interval: DurationSpecifies the minimum interval to wait before indexing chain blocks after receiving a user query. It prevents potential slow downs caused by chain indexation if a user query get executed frequently.
chain_index_deferred_max_interval: DurationSpecifies the maximum interval for which indexation may be blocked by incoming user queries.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for StoreConfig
impl Default for StoreConfig
Source§impl From<NodeStoreConfig> for StoreConfig
impl From<NodeStoreConfig> for StoreConfig
Source§fn from(proto: NodeStoreConfig) -> Self
fn from(proto: NodeStoreConfig) -> Self
impl Copy for StoreConfig
Auto Trait Implementations§
impl Freeze for StoreConfig
impl RefUnwindSafe for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl UnwindSafe for StoreConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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 more