Documentation
¶
Overview ¶
Package honu provides a thin wrapper over an embedded database (leveldb, sqlite) that provides version history to object changes and anti-entropy replication.
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) Delete(key []byte, options ...opts.Option) (_ *pb.Object, err error)
- func (db *DB) Get(key []byte, options ...opts.Option) (value []byte, err error)
- func (db *DB) Iter(prefix []byte, options ...opts.Option) (i iterator.Iterator, err error)
- func (db *DB) Object(key []byte, options ...opts.Option) (_ *pb.Object, err error)
- func (db *DB) Put(key, value []byte, options ...opts.Option) (_ *pb.Object, err error)
- func (db *DB) Update(obj *pb.Object, options ...opts.Option) (err error)
- type DSN
- type VersionManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a Honu embedded database. Currently DB simply wraps a leveldb database
func Open ¶
Open a replicated embedded database with the specified URI. Database URIs should specify protocol:///relative/path/to/db for embedded databases. For absolute paths, specify protocol:////absolute/path/to/db.
func (*DB) Iter ¶
Iter over a subset of keys specified by the prefix. TODO: provide better mechanisms for iteration.
func (*DB) Object ¶
Object returns metadata associated with the latest object stored by the key. Object is the Get function to use if you want to fetch tombstones, otherwise use Get which will return a not found error.
type VersionManager ¶
VersionManager is configured with information associated with the local Replica in order to correctly implement Lamport clocks for sequential, conflict-free replicated versions.
func NewVersionManager ¶
func NewVersionManager(conf config.ReplicaConfig) (v *VersionManager, err error)
NewVersionManager creates a new manager for handling lamport scalar versions.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package iterator provides an interface and implementations to traverse over the contents of an embedded database while maintaining and reading replicated object metadata.
|
Package iterator provides an interface and implementations to traverse over the contents of an embedded database while maintaining and reading replicated object metadata. |
