mount

package
Version: v2.4.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mount provides a Datastore that has other Datastores mounted at various key prefixes and is threadsafe

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMount = errors.New("no datastore mounted for this key")
)

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	// contains filtered or unexported fields
}

func New

func New(mounts []Mount) *Datastore

func (*Datastore) Batch

func (d *Datastore) Batch() (ds.Batch, error)

func (*Datastore) Check added in v1.4.0

func (d *Datastore) Check() error

func (*Datastore) Close

func (d *Datastore) Close() error

func (*Datastore) CollectGarbage added in v1.4.0

func (d *Datastore) CollectGarbage() error

func (*Datastore) Delete

func (d *Datastore) Delete(key ds.Key) error

func (*Datastore) DiskUsage

func (d *Datastore) DiskUsage() (uint64, error)

DiskUsage returns the sum of DiskUsages for the mounted datastores. Non PersistentDatastores will not be accounted.

func (*Datastore) Get

func (d *Datastore) Get(key ds.Key) (value interface{}, err error)

func (*Datastore) Has

func (d *Datastore) Has(key ds.Key) (exists bool, err error)

func (*Datastore) IsThreadSafe

func (d *Datastore) IsThreadSafe()

func (*Datastore) Put

func (d *Datastore) Put(key ds.Key, value interface{}) error

func (*Datastore) Query

func (d *Datastore) Query(q query.Query) (query.Results, error)

func (*Datastore) Scrub added in v1.4.0

func (d *Datastore) Scrub() error

type Mount

type Mount struct {
	Prefix    ds.Key
	Datastore ds.Datastore
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL