NewDataStoreWithContext
Creates a new Data Store with the supplied configuration and context.
def NewDataStoreWithContext(
ctx: context.Context,
cfg: *Config,
scope: promutils.Scope
) - > s *DataStore, err
Creates a new Data Store with the supplied config and context.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| cfg | *Config | The configuration object used to initialize and refresh the Data Store. |
| scope | promutils.Scope | The Prometheus scope for metrics collection within the Data Store. |
Returns
| Type | Description |
|---|---|
s *DataStore, err | A new DataStore instance and an error if the configuration refresh fails. |