tikv

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: MIT Imports: 11 Imported by: 0

README

go-ds-tikv

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosed = errors.New("datastore closed")

Functions

This section is empty.

Types

type Datastore

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

func NewDatastore

func NewDatastore(addr []string, options *Options) (*Datastore, error)

func (*Datastore) Batch

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

func (*Datastore) Close

func (d *Datastore) Close() error

func (*Datastore) CollectGarbage

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)

func (*Datastore) Get

func (d *Datastore) Get(key ds.Key) (value []byte, err error)

func (*Datastore) GetExpiration

func (d *Datastore) GetExpiration(key ds.Key) (time.Time, error)

func (*Datastore) GetSize

func (d *Datastore) GetSize(key ds.Key) (size int, err error)

func (*Datastore) Has

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

func (*Datastore) NewTransaction

func (d *Datastore) NewTransaction(readOnly bool) (ds.Txn, error)

func (*Datastore) Put

func (d *Datastore) Put(key ds.Key, value []byte) error

func (*Datastore) PutWithTTL

func (d *Datastore) PutWithTTL(key ds.Key, value []byte, ttl time.Duration) error

func (*Datastore) Query

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

func (*Datastore) SetTTL

func (d *Datastore) SetTTL(key ds.Key, ttl time.Duration) error

func (*Datastore) Sync

func (d *Datastore) Sync(prefix ds.Key) error

type Options

type Options struct {
	config.Config
}

Options are the badger datastore options, reexported here for convenience.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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