Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func New ¶
func New(storage KeyValueStore) *Database
func (*Database) WriteChanges ¶
type ErrModified ¶
type ErrModified struct{}
func (ErrModified) ErrModified ¶
func (ErrModified) ErrModified()
func (ErrModified) Error ¶
func (ErrModified) Error() string
func (ErrModified) String ¶
func (ErrModified) String() string
type KVSnapshot ¶
type KeyValueStore ¶
type KeyValueStore interface { Snapshot() (KVSnapshot, error) WriteChanges(ss *Snapshot) error }
func LevelDB ¶
func LevelDB(database *leveldb.DB) KeyValueStore
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
func (*Snapshot) Commit ¶
func (ss *Snapshot) Commit(tx *Transaction) bool
func (*Snapshot) NewTransaction ¶
func (ss *Snapshot) NewTransaction() *Transaction
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) DropPrefix ¶
func (tx *Transaction) DropPrefix(prefix string)
func (*Transaction) Set ¶
func (tx *Transaction) Set(key, val string)
Click to show internal directories.
Click to hide internal directories.