Module data_source

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ยง

availability_tests
Generic tests we can instantiate for all the availability data sources.
extension ๐Ÿ”’
fetching
Asynchronous retrieval of missing data.
fs
metrics ๐Ÿ”’
node_tests
Generic tests we can instantiate for all the node data sources.
notifier ๐Ÿ”’
Multi-producer, multi-consumer oneshot notification channel
persistence_tests
Generic tests we can instantiate for any data source with reliable, versioned persistent storage.
sql
status_tests
Generic tests we can instantiate for all the status data sources.
storage
Persistent storage for data sources.
test_helpers ๐Ÿ”’
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.