Skip to main content

NewDataStore

Creates a new Data Store with the supplied configuration.

def NewDataStore(
cfg: *Config,
scope: promutils.Scope
) - > (*DataStore, error)

Creates a new Data Store with the supplied configuration. Callers use this to initialize a data storage instance with specific settings.

Parameters​

NameTypeDescription
cfg*ConfigThe configuration object containing settings for the new Data Store, such as connection details or storage parameters.
scopepromutils.ScopeThe Prometheus scope used for metrics reporting within the Data Store, allowing for monitoring and observability.

Returns​

TypeDescription
(*DataStore, error)A pointer to the newly created DataStore instance and an error if the creation failed.