Documentation ¶
Index ¶
- type MutexDatastore
- func (d *MutexDatastore) Batch(ctx context.Context) (ds.Batch, error)
- func (d *MutexDatastore) Check(ctx context.Context) error
- func (d *MutexDatastore) Children() []ds.Datastore
- func (d *MutexDatastore) Close() error
- func (d *MutexDatastore) CollectGarbage(ctx context.Context) error
- func (d *MutexDatastore) Delete(ctx context.Context, key ds.Key) (err error)
- func (d *MutexDatastore) DiskUsage(ctx context.Context) (uint64, error)
- func (d *MutexDatastore) Get(ctx context.Context, key ds.Key) (value []byte, err error)
- func (d *MutexDatastore) GetSize(ctx context.Context, key ds.Key) (size int, err error)
- func (d *MutexDatastore) Has(ctx context.Context, key ds.Key) (exists bool, err error)
- func (d *MutexDatastore) Put(ctx context.Context, key ds.Key, value []byte) (err error)
- func (d *MutexDatastore) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
- func (d *MutexDatastore) Scrub(ctx context.Context) error
- func (d *MutexDatastore) Sync(ctx context.Context, 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 datastore 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) 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(ctx context.Context) error
func (*MutexDatastore) DiskUsage ¶
func (d *MutexDatastore) DiskUsage(ctx context.Context) (uint64, error)
DiskUsage implements the PersistentDatastore interface.
Click to show internal directories.
Click to hide internal directories.