datastore

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: Apache-2.0, MIT Imports: 7 Imported by: 12

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL