motrds

package
v0.0.0-...-d848671 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalAddr       string
	HaxAddr         string
	ProfileFid      string
	LocalProcessFid string
	Idx             string
	LevelDBPath     string
	Threads         int
	Trace           bool
}

type MotrDatastore

type MotrDatastore struct {
	Config
	mio.Mkv
	Ldb  leveldb.DB
	Lock *sync.RWMutex
}

func NewMotrDatastore

func NewMotrDatastore(conf Config) (*MotrDatastore, error)

func (*MotrDatastore) Batch

func (d *MotrDatastore) Batch(ctx context.Context) (ds.Batch, error)

func (*MotrDatastore) Close

func (d *MotrDatastore) Close() error

func (*MotrDatastore) Delete

func (d *MotrDatastore) Delete(ctx context.Context, key ds.Key) (err error)

func (*MotrDatastore) DiskUsage

func (d *MotrDatastore) DiskUsage(ctx context.Context) (uint64, error)

DiskUsage returns the current disk size used by this levelDB. For in-mem datastores, it will return 0.

func (*MotrDatastore) Get

func (d *MotrDatastore) Get(ctx context.Context, key ds.Key) ([]byte, error)

func (*MotrDatastore) GetSize

func (d *MotrDatastore) GetSize(ctx context.Context, key ds.Key) (size int, err error)

func (*MotrDatastore) Has

func (d *MotrDatastore) Has(ctx context.Context, key ds.Key) (bool, error)

func (*MotrDatastore) Put

func (d *MotrDatastore) Put(ctx context.Context, key ds.Key, value []byte) (err error)

func (*MotrDatastore) Query

func (d *MotrDatastore) Query(ctx context.Context, q query.Query) (query.Results, error)

Query the LevelDB metadata store for Motr keys and retrieve objects from Motr when data is requested

func (*MotrDatastore) Sync

func (d *MotrDatastore) Sync(ctx context.Context, prefix ds.Key) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL