Module data_source

Source
Expand description

Persistent storage and sources of data consumed by APIs.

The APIs provided by this query service are generic over the implementation which actually retrieves data in answer to queries. We call this implementation a data source. This module defines a data source and provides several pre-built implementations:

The user can choose which data source to use when initializing the query service.

We also provide combinators for modularly adding functionality to existing data sources:

Re-exportsยง

pub use fetching::AvailabilityProvider;
pub use fetching::FetchingDataSource;
pub use fs::FileSystemDataSource;
pub use sql::SqlDataSource;

Modulesยง

extension ๐Ÿ”’
fetching
Asynchronous retrieval of missing data.
fs
metrics ๐Ÿ”’
notifier ๐Ÿ”’
Multi-producer, multi-consumer oneshot notification channel
sql
storage
Persistent storage for data sources.
update ๐Ÿ”’
A generic algorithm for updating a HotShot Query Service data source with new data.

Structsยง

ExtensibleDataSource
Wrapper to add extensibility to an existing data source.
MetricsDataSource
A minimal data source for the status API provided in this crate, with no persistent storage.

Traitsยง

Transaction
A unit of atomicity for updating a shared data source.
UpdateDataSource
An extension trait for types which implement the update trait for each API module.
VersionedDataSource
A data source with an atomic transaction-based synchronization interface.