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
| Name | Type | Description |
|---|---|---|
| cfg | *Config | The configuration object containing settings for the new Data Store, such as connection details or storage parameters. |
| scope | promutils.Scope | The Prometheus scope used for metrics reporting within the Data Store, allowing for monitoring and observability. |
Returns
| Type | Description |
|---|---|
(*DataStore, error) | A pointer to the newly created DataStore instance and an error if the creation failed. |