KVStoreConstructur doc
This commit is contained in:
parent
414d21a541
commit
87c7e9915e
|
@ -28,6 +28,12 @@ func RegisterKVStore(name string, constructor KVStoreConstructor) {
|
|||
stores[name] = constructor
|
||||
}
|
||||
|
||||
// KVStoreConstructor is used to build a KVStore of a specific type when
|
||||
// specificied by the index configuration. In addition to meeting the
|
||||
// store.KVStore interface, KVStores must also support this constructor.
|
||||
// Note that currently the values of config must
|
||||
// be able to be marshaled and unmarshaled using the encoding/json library (used
|
||||
// when reading/writing the index metadata file).
|
||||
type KVStoreConstructor func(mo store.MergeOperator, config map[string]interface{}) (store.KVStore, error)
|
||||
type KVStoreRegistry map[string]KVStoreConstructor
|
||||
|
||||
|
|
Loading…
Reference in New Issue