store

package
v3.0.0-...-a9a26d0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PebbleDBConfig

type PebbleDBConfig struct {
	KVLRUCacheSize                   int64
	KVWriteBufferSize                int
	KVMaxWriteBufferNumber           int
	KVLevel0FileNumCompactionTrigger int
	KVLevel0StopWritesTrigger        int
	KVMaxBytesForLevelBase           int64
	KVTargetFileSizeBase             int64
	KVTargetFileSizeMultiplier       int64
	KVNumOfLevels                    int
	KVMaxOpenFiles                   int
	KVMaxConcurrentCompactions       int
	KVBlockSize                      int
	KVMaxManifestFileSize            int64
	KVBytesPerSync                   int
	KVWALBytesPerSync                int
}

type PebbleShardOption

type PebbleShardOption struct {
	Target    string
	ReplicaId uint64
	ShardId   uint64
}

type Store

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

func NewStore

func NewStore(shardId uint64, path string, opts PebbleShardOption, log *zap.Logger) (*Store, error)

func (*Store) Batch

func (s *Store) Batch() *pebble.Batch

func (*Store) BuildColumnFamilyKey

func (s *Store) BuildColumnFamilyKey(cf byte, key []byte) []byte

func (*Store) Close

func (s *Store) Close() error

func (*Store) GetBytes

func (s *Store) GetBytes(key []byte) ([]byte, error)

func (*Store) GetColumnFamily

func (s *Store) GetColumnFamily(cf string) byte

func (*Store) GetIterator

func (s *Store) GetIterator() *pebble.Iterator

func (*Store) GetWo

func (s *Store) GetWo() *pebble.WriteOptions

func (*Store) LoadSnapShotFromReader

func (s *Store) LoadSnapShotFromReader(reader io.Reader, stopChan <-chan struct{}) error

func (*Store) NewSnapshotDir

func (s *Store) NewSnapshotDir() (string, error)

func (*Store) SaveSnapShotToWriter

func (s *Store) SaveSnapShotToWriter(path string, writer io.Writer, stopChan <-chan struct{}) error

func (*Store) Write

func (s *Store) Write(b *pebble.Batch) error

Jump to

Keyboard shortcuts

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