Documentation ¶
Index ¶
- type Datastore
- func (d *Datastore) Batch() (ds.Batch, error)
- func (d *Datastore) Close() (err error)
- func (a Datastore) Delete(key ds.Key) (err error)
- func (d *Datastore) DiskUsage() (uint64, error)
- func (a Datastore) Get(key ds.Key) (value []byte, err error)
- func (d Datastore) GetSize(key ds.Key) (size int, err error)
- func (a Datastore) Has(key ds.Key) (exists bool, err error)
- func (d *Datastore) IsThreadSafe()
- func (d *Datastore) NewTransaction(readOnly bool) (ds.Txn, error)
- func (a Datastore) Put(key ds.Key, value []byte) (err error)
- func (a Datastore) Query(q dsq.Query) (dsq.Results, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
func NewDatastore ¶
NewDatastore returns a new datastore backed by leveldb
for path == "", an in memory bachend will be chosen
func (*Datastore) DiskUsage ¶
DiskUsage returns the current disk size used by this levelDB. For in-mem datastores, it will return 0.
func (*Datastore) IsThreadSafe ¶
func (d *Datastore) IsThreadSafe()
func (*Datastore) NewTransaction ¶
Click to show internal directories.
Click to hide internal directories.