Documentation ¶
Index ¶
- type Datastore
- func (d *Datastore) Batch() (datastore.Batch, error)
- func (d *Datastore) Close() error
- func (d *Datastore) Delete(key datastore.Key) error
- func (d *Datastore) DiskUsage() (uint64, error)
- func (d *Datastore) Get(key datastore.Key) ([]byte, error)
- func (d *Datastore) GetSize(key datastore.Key) (int, error)
- func (d *Datastore) Has(key datastore.Key) (bool, error)
- func (d *Datastore) Put(key datastore.Key, value []byte) error
- func (d *Datastore) Query(q query.Query) (query.Results, error)
- func (d *Datastore) Sync(prefix datastore.Key) error
- func (d *Datastore) ToggleWALStats()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore implements a pebble backed ipfs datastore
func NewDatastore ¶
NewDatastore instantiates a new pebble datastore
func (*Datastore) Batch ¶
Batch returns a batchable datastore useful for combining many operations into one
func (*Datastore) DiskUsage ¶
DiskUsage returns the space used by our datastore in bytes it does not include the WAL (Write Ahead Log) size and only includes total size from all the "levels"
func (*Datastore) Query ¶
Query is used to search a datastore for keys, and optionally values matching a given query
func (*Datastore) Sync ¶ added in v0.0.7
Sync is used to manually trigger syncing db contents to disk. This call is only usable when synchronous writes aren't enabled
func (*Datastore) ToggleWALStats ¶
func (d *Datastore) ToggleWALStats()
ToggleWALStats is used to toggle reporting of WAL statistics when runnning DiskUsage