tee

package
v0.0.0-...-a582c34 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTeeLogDB

func MakeTeeLogDB(odb raftio.ILogDB, ndb raftio.ILogDB) raftio.ILogDB

MakeTeeLogDB returns a LogDB instance combined from the specified odb and ndb instances.

func NewPebbleLogDB

func NewPebbleLogDB(nhConfig config.NodeHostConfig,
	cb config.LogDBCallback,
	dirs []string, wals []string) (raftio.ILogDB, error)

NewPebbleLogDB creates a new LogDB instance.

func NewRocksDBLogDB

func NewRocksDBLogDB(nhConfig config.NodeHostConfig,
	cb config.LogDBCallback,
	dirs []string, wals []string) (raftio.ILogDB, error)

NewRocksDBLogDB creates a new RocksDB based LogDB instance

func NewTeeLogDB

func NewTeeLogDB(nhConfig config.NodeHostConfig,
	cb config.LogDBCallback,
	dirs []string, wals []string) (raftio.ILogDB, error)

NewTeeLogDB creates a new LogDB instance backed by a pebble and a rocksdb based ILogDB.

Types

type LogDB

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

LogDB is a special LogDB module used for testing purposes.

func (*LogDB) BinaryFormat

func (t *LogDB) BinaryFormat() uint32

BinaryFormat ...

func (*LogDB) Close

func (t *LogDB) Close() error

Close ...

func (*LogDB) CompactEntriesTo

func (t *LogDB) CompactEntriesTo(clusterID uint64,
	nodeID uint64, index uint64) (<-chan struct{}, error)

CompactEntriesTo ...

func (*LogDB) GetBootstrapInfo

func (t *LogDB) GetBootstrapInfo(clusterID uint64,
	nodeID uint64) (pb.Bootstrap, error)

GetBootstrapInfo ...

func (*LogDB) GetSnapshot

func (t *LogDB) GetSnapshot(clusterID uint64,
	nodeID uint64) (pb.Snapshot, error)

GetSnapshot ...

func (*LogDB) ImportSnapshot

func (t *LogDB) ImportSnapshot(ss pb.Snapshot, nodeID uint64) error

ImportSnapshot ...

func (*LogDB) IterateEntries

func (t *LogDB) IterateEntries(ents []pb.Entry,
	size uint64, clusterID uint64, nodeID uint64, low uint64,
	high uint64, maxSize uint64) ([]pb.Entry, uint64, error)

IterateEntries ...

func (*LogDB) ListNodeInfo

func (t *LogDB) ListNodeInfo() ([]raftio.NodeInfo, error)

ListNodeInfo ...

func (*LogDB) Name

func (t *LogDB) Name() string

Name ...

func (*LogDB) ReadRaftState

func (t *LogDB) ReadRaftState(clusterID uint64,
	nodeID uint64, lastIndex uint64) (raftio.RaftState, error)

ReadRaftState ...

func (*LogDB) RemoveEntriesTo

func (t *LogDB) RemoveEntriesTo(clusterID uint64,
	nodeID uint64, index uint64) error

RemoveEntriesTo ...

func (*LogDB) RemoveNodeData

func (t *LogDB) RemoveNodeData(clusterID uint64, nodeID uint64) error

RemoveNodeData ...

func (*LogDB) SaveBootstrapInfo

func (t *LogDB) SaveBootstrapInfo(clusterID uint64,
	nodeID uint64, bootstrap pb.Bootstrap) error

SaveBootstrapInfo ...

func (*LogDB) SaveRaftState

func (t *LogDB) SaveRaftState(updates []pb.Update, shardID uint64) error

SaveRaftState ...

func (*LogDB) SaveSnapshots

func (t *LogDB) SaveSnapshots(updates []pb.Update) error

SaveSnapshots ...

Jump to

Keyboard shortcuts

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