leveldb

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelDBStore

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

func NewLevelDBStore

func NewLevelDBStore(path string) (s *LevelDBStore, err error)

func (*LevelDBStore) Close

func (s *LevelDBStore) Close() error

func (*LevelDBStore) Count added in v0.1.1

func (s *LevelDBStore) Count() (count int, err error)

func (*LevelDBStore) Delete

func (s *LevelDBStore) Delete(addr chunk.Address) (err error)

func (*LevelDBStore) Get

func (s *LevelDBStore) Get(addr chunk.Address) (c chunk.Chunk, err error)

func (*LevelDBStore) Has

func (s *LevelDBStore) Has(addr chunk.Address) (yes bool, err error)

func (*LevelDBStore) Iterate added in v0.1.2

func (s *LevelDBStore) Iterate(fn func(chunk.Chunk) (stop bool, err error)) (err error)

func (*LevelDBStore) Put

func (s *LevelDBStore) Put(ch chunk.Chunk) (err error)

type MetaStore

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

func NewMetaStore

func NewMetaStore(filename string) (s *MetaStore, err error)

func (*MetaStore) Close

func (s *MetaStore) Close() (err error)

func (*MetaStore) Count added in v0.1.1

func (s *MetaStore) Count() (count int, err error)

func (*MetaStore) FreeOffset

func (s *MetaStore) FreeOffset(shard uint8) (offset int64, err error)

func (*MetaStore) Get

func (s *MetaStore) Get(addr chunk.Address) (m *forky.Meta, err error)

func (*MetaStore) Iterate added in v0.1.2

func (s *MetaStore) Iterate(fn func(chunk.Address, *forky.Meta) (stop bool, err error)) (err error)

func (*MetaStore) Remove

func (s *MetaStore) Remove(addr chunk.Address, shard uint8) (err error)

func (*MetaStore) Set

func (s *MetaStore) Set(addr chunk.Address, shard uint8, reclaimed bool, m *forky.Meta) (err error)

Jump to

Keyboard shortcuts

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