Skip to main content

RegisterStowKind

Registers a new kind of stow store. This function will return an error if the specified kind is already registered.

def RegisterStowKind(
kind: string,
f: func(string) DataReference
) - > error

Registers a new kind of stow store. This function is used to extend the system with custom storage types.

Parameters

NameTypeDescription
kindstringThe unique identifier for the new stow store kind.
ffunc(string) DataReferenceA function that creates a DataReference for the specified kind. This function will be called when a new store of this kind needs to be instantiated.

Returns

TypeDescription
errorAn error if the kind is already registered, otherwise nil.