Skip to main content

NewInMemoryRawStore

Initializes and returns a new in-memory raw data store. This function creates an InMemoryStore instance, which stores raw file data in a map, and sets up its internal copy mechanism.

def NewInMemoryRawStore(
_: context.Context,
_: *Config,
metrics: *dataStoreMetrics
) - > RawStore, error

Creates and initializes a new in-memory raw data store. This store is suitable for testing or scenarios where data persistence across application restarts is not required.

Parameters

NameTypeDescription
_context.ContextThe context for the operation, though it is not used in this function.
_*ConfigThe configuration object, though it is not used in this function.
metrics*dataStoreMetricsThe metrics object used to track copy operation statistics within the store.

Returns

TypeDescription
RawStore, errorThe initialized in-memory raw store and an error if initialization fails.