Documentation ¶
Index ¶
- type Datastore
- func (d *Datastore) Batch(ctx context.Context) (ds.Batch, error)
- func (d *Datastore) Close() (err error)
- func (a Datastore) Delete(ctx context.Context, key ds.Key) (err error)
- func (d *Datastore) DiskUsage(ctx context.Context) (uint64, error)
- func (a Datastore) Get(ctx context.Context, key ds.Key) (value []byte, err error)
- func (a Datastore) GetSize(ctx context.Context, key ds.Key) (size int, err error)
- func (a Datastore) Has(ctx context.Context, key ds.Key) (exists bool, err error)
- func (d *Datastore) NewTransaction(ctx context.Context, readOnly bool) (ds.Txn, error)
- func (a Datastore) Put(ctx context.Context, key ds.Key, value []byte) (err error)
- func (a Datastore) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
- func (a Datastore) Sync(ctx context.Context, prefix ds.Key) 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 backend 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) NewTransaction ¶
Click to show internal directories.
Click to hide internal directories.