Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrStoreNotFound ¶
func RegisterStorage ¶
func RegisterStorage(name string, cfg ConfigFromMaps)
RegisterStorage registers a storage with the given name and configuration.
Parameters: - name: the name of the storage to register. - cfg: the configuration for the storage.
Types ¶
type ConfigFromMaps ¶
type ConfigFromMaps func(map[string]interface{}) (DatastoreConfig, error)
type DatastoreConfig ¶
type DatastoreConfig interface { StoreInfo() StoreInfo // Create instantiate a new datastore from this config Create(path string) (datastore.Datastore, error) }
func AnyDatastoreConfig ¶
func AnyDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)
AnyDatastoreConfig returns a DatastoreConfig from a spec based on the "type" parameter
func LoadStorage ¶
func LoadStorage(name string, cfg map[string]any) (DatastoreConfig, error)
LoadStorage loads a datastore configuration based on the given name and configuration map.
Parameters: - name: the name of the datastore to load. - cfg: the configuration map for the datastore.
Returns: - DatastoreConfig: the loaded datastore configuration. - error: an error if the datastore is not found.
func MountDatastoreConfig ¶
func MountDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)
MountDatastoreConfig returns a mount DatastoreConfig from a spec
Click to show internal directories.
Click to hide internal directories.