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:
Elle Mouton committed 2025-05-22 14:14:40 +02:00
1 parent 11b27f07da
commit 52018dbbec
3 files changed
+336

No files matched your search

+4
View File
@@ -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,