18 lines
459 B
Go
18 lines
459 B
Go
package db
|
|
|
|
import "github.com/hashicorp/go-memdb"
|
|
|
|
// ReadTxn is implemented by memdb.Txn to perform read operations.
|
|
type ReadTxn interface {
|
|
Get(table, index string, args ...interface{}) (memdb.ResultIterator, error)
|
|
Abort()
|
|
}
|
|
|
|
// Changes wraps a memdb.Changes to include the index at which these changes
|
|
// were made.
|
|
type Changes struct {
|
|
// Index is the latest index at the time these changes were committed.
|
|
Index uint64
|
|
Changes memdb.Changes
|
|
}
|