graph/db: introduce the V1Store interface
In this commit, we introduce the `V1Store` interface which the existing `graphdb.KVStore` implements today. The idea is to eventually create a SQL DB backed implementation of this interface.
This commit is contained in:
3 files changed
+336
No files matched your search
@@ -196,6 +196,10 @@ type KVStore struct {
|
||||
nodeScheduler batch.Scheduler
|
||||
}
|
||||
|
||||
// A compile-time assertion to ensure that the KVStore struct implements the
|
||||
// V1Store interface.
|
||||
var _ V1Store = (*KVStore)(nil)
|
||||
|
||||
// NewKVStore allocates a new KVStore backed by a DB instance. The
|
||||
// returned instance has its own unique reject cache and channel cache.
|
||||
func NewKVStore(db kvdb.Backend, options ...KVStoreOptionModifier) (*KVStore,
|
||||
|
||||
Reference in new issue
Block a user