Documentation ¶
Overview ¶
Package failstore implements a datastore which can produce custom failures on operations by calling a user-provided error function.
Index ¶
- type FailBatch
- type Failstore
- func (d *Failstore) Batch() (ds.Batch, error)
- func (d *Failstore) Close() error
- func (d *Failstore) Delete(k ds.Key) error
- func (d *Failstore) DiskUsage() (uint64, error)
- func (d *Failstore) Get(k ds.Key) ([]byte, error)
- func (d *Failstore) GetSize(k ds.Key) (int, error)
- func (d *Failstore) Has(k ds.Key) (bool, error)
- func (d *Failstore) Put(k ds.Key, val []byte) error
- func (d *Failstore) Query(q dsq.Query) (dsq.Results, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailBatch ¶
type FailBatch struct {
// contains filtered or unexported fields
}
FailBatch implements batching operations on the Failstore.
type Failstore ¶
type Failstore struct {
// contains filtered or unexported fields
}
Failstore is a datastore which fails according to a user-provided function.
func NewFailstore ¶
NewFailstore creates a new datastore with the given error function. The efunc will be called with different strings depending on the datastore function: put, get, has, delete, query, batch, batch-put, batch-delete and batch-commit are the possible values.
Click to show internal directories.
Click to hide internal directories.