Documentation ¶
Index ¶
- type MutexDatastore
- func (d *MutexDatastore) Batch() (ds.Batch, error)
- func (d *MutexDatastore) Check() error
- func (d *MutexDatastore) Children() []ds.Datastore
- func (d *MutexDatastore) Close() error
- func (d *MutexDatastore) CollectGarbage() error
- func (d *MutexDatastore) Delete(key ds.Key) (err error)
- func (d *MutexDatastore) DiskUsage() (uint64, error)
- func (d *MutexDatastore) Get(key ds.Key) (value []byte, err error)
- func (d *MutexDatastore) GetSize(key ds.Key) (size int, err error)
- func (d *MutexDatastore) Has(key ds.Key) (exists bool, err error)
- func (d *MutexDatastore) Put(key ds.Key, value []byte) (err error)
- func (d *MutexDatastore) Query(q dsq.Query) (dsq.Results, error)
- func (d *MutexDatastore) Scrub() error
- func (d *MutexDatastore) Sync(prefix ds.Key) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutexDatastore ¶
MutexDatastore contains a child datastire and a mutex. used for coarse sync
func MutexWrap ¶
func MutexWrap(d ds.Datastore) *MutexDatastore
MutexWrap constructs a datastore with a coarse lock around the entire datastore, for every single operation.
func (*MutexDatastore) Check ¶
func (d *MutexDatastore) Check() error
func (*MutexDatastore) Children ¶
func (d *MutexDatastore) Children() []ds.Datastore
Children implements Shim
func (*MutexDatastore) Close ¶
func (d *MutexDatastore) Close() error
func (*MutexDatastore) CollectGarbage ¶
func (d *MutexDatastore) CollectGarbage() error
func (*MutexDatastore) Delete ¶
func (d *MutexDatastore) Delete(key ds.Key) (err error)
Delete implements Datastore.Delete
func (*MutexDatastore) DiskUsage ¶
func (d *MutexDatastore) DiskUsage() (uint64, error)
DiskUsage implements the PersistentDatastore interface.
func (*MutexDatastore) Get ¶
func (d *MutexDatastore) Get(key ds.Key) (value []byte, err error)
Get implements Datastore.Get
func (*MutexDatastore) GetSize ¶
func (d *MutexDatastore) GetSize(key ds.Key) (size int, err error)
GetSize implements Datastore.GetSize
func (*MutexDatastore) Has ¶
func (d *MutexDatastore) Has(key ds.Key) (exists bool, err error)
Has implements Datastore.Has
func (*MutexDatastore) Put ¶
func (d *MutexDatastore) Put(key ds.Key, value []byte) (err error)
Put implements Datastore.Put
func (*MutexDatastore) Scrub ¶
func (d *MutexDatastore) Scrub() error
Click to show internal directories.
Click to hide internal directories.