0
0
Fork 0

KVStoreConstructur doc

This commit is contained in:
Rob McColl 2016-10-19 10:28:44 -04:00 committed by GitHub
parent 414d21a541
commit 87c7e9915e
1 changed files with 6 additions and 0 deletions

View File

@ -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