Documentation ¶
Overview ¶
Package datastore provides an abstraction on top of go-datastore that allows you to make a datastore that tracks its own version and knows how to migrate itself to the target version
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMigratedDatastore ¶
func NewMigratedDatastore(ds datastore.Batching, ms versioning.MigrationState) datastore.Batching
NewMigratedDatastore returns a datastore whose functions will fail until the migration state says its ready
func NewVersionedDatastore ¶
func NewVersionedDatastore(ds datastore.Batching, migrations versioning.VersionedMigrationList, target versioning.VersionKey) (datastore.Batching, func(context.Context) error)
NewVersionedDatastore sets takes a datastore, migrations, list, and target version, and returns a datastore whose functions will fail till it's migrated to the target version and a function to run migrations
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.